summaryrefslogtreecommitdiff
path: root/lib/irc
diff options
context:
space:
mode:
authorJordan Bracco <href@random.sh>2022-12-11 19:07:09 +0000
committerJordan Bracco <href@random.sh>2022-12-11 19:07:09 +0000
commitbc3d5b7f4f54d88a2ebf1cadbcd7e2816f07deaa (patch)
treee4880c66b7a2c79de59fd24107c498ba3b0e518b /lib/irc
parentfeat(telegram): create account for telegram user (diff)
Fix the fixes.
Diffstat (limited to '')
-rw-r--r--lib/irc/account.ex2
-rw-r--r--lib/irc/connection.ex2
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