diff options
Diffstat (limited to 'lib/lsg/telegram_room.ex')
-rw-r--r-- | lib/lsg/telegram_room.ex | 6 |
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 |