diff options
author | Jordan Bracco <href@random.sh> | 2022-12-11 19:07:09 +0000 |
---|---|---|
committer | Jordan Bracco <href@random.sh> | 2022-12-11 19:07:09 +0000 |
commit | bc3d5b7f4f54d88a2ebf1cadbcd7e2816f07deaa (patch) | |
tree | e4880c66b7a2c79de59fd24107c498ba3b0e518b /lib/irc | |
parent | feat(telegram): create account for telegram user (diff) |
Fix the fixes.
Diffstat (limited to '')
-rw-r--r-- | lib/irc/account.ex | 2 | ||||
-rw-r--r-- | lib/irc/connection.ex | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/lib/irc/account.ex b/lib/irc/account.ex index beb8daa..46c7f6e 100644 --- a/lib/irc/account.ex +++ b/lib/irc/account.ex @@ -242,7 +242,7 @@ defmodule IRC.Account do get(id) end - defp new_account(%{nick: nick, network: server}) do + def new_account(%{nick: nick, network: server}) do id = EntropyString.large_id() :dets.insert(file("db"), {id, nick, EntropyString.token()}) :dets.insert(file("predicates"), {{server, {:nick, nick}}, id}) diff --git a/lib/irc/connection.ex b/lib/irc/connection.ex index 1e94003..9382714 100644 --- a/lib/irc/connection.ex +++ b/lib/irc/connection.ex @@ -311,7 +311,7 @@ defmodule IRC.Connection do def handle_info({:received, text, sender}, state) do reply_fun = fn(text) -> irc_reply(state, {sender.nick, sender}, text) end account = IRC.Account.lookup(sender) - message = %IRC.Message{id: FlakeId.get(), transport: irc, text: text, network: state.network, at: NaiveDateTime.utc_now(), + message = %IRC.Message{id: FlakeId.get(), transport: :irc, text: text, network: state.network, at: NaiveDateTime.utc_now(), account: account, sender: sender, replyfun: reply_fun, trigger: extract_trigger(text)} message = case IRC.UserTrack.messaged(message) do :ok -> message |