patch 75f57f811bc8cabaaeeb6998f39fdbf9f34fe000
Author: E. Bosch <presidev@AT@gmail.com>
Date: Thu Jan 27 23:40:06 CET 2022
* irc: When the user sends a message for him/herself it will be stored in the
"saved messages" space in Telegram, but no event will be returned to
irgramd, so irgramd will echo the message to the user in IRC.
diff -rN -u old-irgramd/irc.py new-irgramd/irc.py
--- old-irgramd/irc.py 2024-11-22 16:25:38.040382223 +0100
+++ new-irgramd/irc.py 2024-11-22 16:25:38.040382223 +0100
@@ -350,7 +350,13 @@
async def handle_irc_privmsg(self, user, nick, message):
self.logger.debug('Handling PRIVMSG: %s, %s', nick, message)
- target = self.tg.tg_username if nick == user.irc_nick else nick
+ if nick == user.irc_nick:
+ target = self.tg.tg_username
+ # Echo message to the user him/herself in IRC
+ # because no event will be received from Telegram
+ await self.send_msg(user, None, message)
+ else:
+ target = nick
tgt = target.lower()
if tgt not in self.iid_to_tid: