telegram: Limit text length for reactions to twice as replies
patch 7db9d9a07af099b00a32a6ee0197c400a52240e5
Author: E. Bosch <presidev@AT@gmail.com>
Date: Sun Oct 13 23:00:24 CEST 2024
* telegram: Limit text length for reactions to twice as replies
diff -rN -u old-irgramd/telegram.py new-irgramd/telegram.py
--- old-irgramd/telegram.py 2024-11-22 04:42:59.655287587 +0100
+++ new-irgramd/telegram.py 2024-11-22 04:42:59.659287581 +0100
@@ -505,8 +505,9 @@
self.sorted_len_usernames.sort(key=lambda k: len(k), reverse=True)
def format_reaction(self, msg, message_rendered, edition_case, reaction):
- if len(message_rendered) > self.quote_len and not msg.is_reply:
- text_old = '{}...'.format(message_rendered[:self.quote_len])
+ react_quote_len = self.quote_len * 2
+ if len(message_rendered) > react_quote_len:
+ text_old = '{}...'.format(message_rendered[:react_quote_len])
text_old = fix_braces(text_old)
else:
text_old = message_rendered