summaryrefslogtreecommitdiff
path: root/lib/lsg/telegram.ex
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--lib/lsg/telegram.ex7
1 files changed, 2 insertions, 5 deletions
diff --git a/lib/lsg/telegram.ex b/lib/lsg/telegram.ex
index e5790da..e8758e3 100644
--- a/lib/lsg/telegram.ex
+++ b/lib/lsg/telegram.ex
@@ -66,7 +66,6 @@ defmodule LSG.Telegram do
{:ok, %{account: account.id}}
end
-
#[debug] Unhandled update: %{"message" =>
# %{"chat" => %{"first_name" => "J", "id" => 2075406, "type" => "private", "username" => "ahref"},
# "date" => 1591096015,
@@ -145,10 +144,8 @@ defmodule LSG.Telegram do
do
path = LSGWeb.Router.Helpers.url(LSGWeb.Endpoint) <> "/files/#{s3path}"
sent = for {net, chan} <- target do
- user = IRC.UserTrack.find_by_account(net, account)
- nick = if(user, do: user.nick, else: account.name)
- txt = "#{nick} sent#{type}#{text} #{path}"
- IRC.Connection.broadcast_message(net, chan, txt)
+ txt = "sent#{type}#{text} #{path}"
+ IRC.send_message_as(account, net, chan, txt)
"#{net}/#{chan}"
end
if caption = op["caption"], do: as_irc_message(chat_id, caption, account)