patch 4f4de75d90e58e3985a7cbd8f6aad6ace683a406
Author: E. Bosch <presidev@AT@gmail.com>
Date: Sat Apr 29 23:02:02 CEST 2023
* telegram: Add conversion of UTF-8 emojis to ASCII emoticons for all messages (not only reactions)
hunk ./emoji2emoticon.py 89
+
+def replace_mult(line, emo):
+ for utf_emo in emo:
+ if utf_emo in line:
+ line = line.replace(utf_emo, emo[utf_emo])
+ return line
hunk ./telegram.py 364
- message = event.message.message
+ message = e.replace_mult(event.message.message, e.emo)
hunk ./telegram.py 372
- t = self.cache[id]['text']
+ t = e.replace_mult(self.cache[id]['text'], e.emo)
hunk ./telegram.py 468
+ message = e.replace_mult(message, e.emo)