From 28ab854e9dbcd2e40fc4b7986f4e5dd303bf27a1 Mon Sep 17 00:00:00 2001 From: href Date: Thu, 2 Sep 2021 13:00:55 +0200 Subject: improve puppets, fix uploads --- lib/lsg/telegram.ex | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'lib/lsg/telegram.ex') 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) -- cgit v1.2.3