summaryrefslogtreecommitdiff
path: root/lib/lsg/telegram.ex
diff options
context:
space:
mode:
authorhref <href@random.sh>2021-09-02 13:00:55 +0200
committerhref <href@random.sh>2021-09-02 13:00:55 +0200
commit28ab854e9dbcd2e40fc4b7986f4e5dd303bf27a1 (patch)
tree62bda7f25e7d9282283fc8eca290f60d7d0d8c86 /lib/lsg/telegram.ex
parentlastfm: improvements, fixes (diff)
improve puppets, fix uploads
Diffstat (limited to 'lib/lsg/telegram.ex')
-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)