summaryrefslogtreecommitdiff
path: root/lib/lsg
diff options
context:
space:
mode:
authorhref <href@random.sh>2021-09-02 09:56:32 +0200
committerhref <href@random.sh>2021-09-02 09:56:32 +0200
commit9b6d97fb820d2efc6892b0ada3340df10df35f4b (patch)
tree6d7200c07e610a2ae56128cf716e4ffda18d9d9e /lib/lsg
parentweb: show help for only enabled plugins (diff)
puppet connections
Diffstat (limited to 'lib/lsg')
-rw-r--r--lib/lsg/telegram_room.ex6
1 files changed, 2 insertions, 4 deletions
diff --git a/lib/lsg/telegram_room.ex b/lib/lsg/telegram_room.ex
index 8c228e1..f973c58 100644
--- a/lib/lsg/telegram_room.ex
+++ b/lib/lsg/telegram_room.ex
@@ -22,10 +22,8 @@ defmodule LSG.TelegramRoom do
def handle_update(%{"message" => %{"from" => %{"id" => user_id}, "text" => text}}, _token, state) do
account = IRC.Account.find_meta_account("telegram-id", user_id)
- user = IRC.UserTrack.find_by_account(state.net, account)
- nick = if(user, do: user.nick, else: account.name)
- prefix = "<#{nick}> "
- IRC.Connection.broadcast_message(state.net, state.chan, "#{prefix}#{text}")
+ connection = IRC.Connection.get_network(state.net)
+ IRC.PuppetConnection.send_message(account, connection, state.chan, text)
{:ok, state}
end