patch c1ffe716a42ea01ca345d7a756b685d7174f99c5
Author: E. Bosch <presidev@AT@gmail.com>
Date: Sun Oct 6 23:59:23 CEST 2024
* telegram: Fix regression in delete reaction event
diff -rN -u old-irgramd/telegram.py new-irgramd/telegram.py
--- old-irgramd/telegram.py 2024-11-22 04:24:49.369019025 +0100
+++ new-irgramd/telegram.py 2024-11-22 04:24:49.369019025 +0100
@@ -517,7 +517,7 @@
react_action = '+'
react_icon = e.emo[emoji] if emoji in e.emo else emoji
elif edition_case == 'react-del':
- user = self.get_irc_user_from_telegram(event.sender_id)
+ user = self.get_irc_user_from_telegram(msg.sender_id)
react_action = '-'
react_icon = ''
return text_old, '{}{}'.format(react_action, react_icon), user
@@ -555,9 +555,10 @@
# Reactions
else:
- if self.last_reaction == reaction.date:
- return
- self.last_reaction = reaction.date
+ if reaction:
+ if self.last_reaction == reaction.date:
+ return
+ self.last_reaction = reaction.date
action = 'React'
text_old, edition_react, user = self.format_reaction(event.message, message_rendered, edition_case, reaction)