summaryrefslogtreecommitdiff
path: root/lib/lsg_irc/user_mention_plugin.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_irc/user_mention_plugin.ex
parentlastfm: improvements, fixes (diff)
improve puppets, fix uploads
Diffstat (limited to 'lib/lsg_irc/user_mention_plugin.ex')
-rw-r--r--lib/lsg_irc/user_mention_plugin.ex3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/lsg_irc/user_mention_plugin.ex b/lib/lsg_irc/user_mention_plugin.ex
index 5f7b10a..ca743c4 100644
--- a/lib/lsg_irc/user_mention_plugin.ex
+++ b/lib/lsg_irc/user_mention_plugin.ex
@@ -20,6 +20,9 @@ defmodule LSG.IRC.UserMentionPlugin do
end
def handle_info({:irc, :trigger, nick, message = %IRC.Message{sender: sender, account: account, network: network, channel: channel, trigger: %IRC.Trigger{type: :at, args: content}}}, state) do
+ nick = nick
+ |> String.trim(":")
+ |> String.trim(",")
target = IRC.Account.find_always_by_nick(network, channel, nick)
if target do
telegram = IRC.Account.get_meta(target, "telegram-id")