telegram: Fix: in forwards when the original user is unknown use the ID
patch cbec6bc5a68bcadaaea6113355f12056d10cf577
Author: E. Bosch <presidev@AT@gmail.com>
Date: Fri Jun 23 23:49:58 CEST 2023
* telegram: Fix: in forwards when the original user is unknown use the ID
diff -rN -u old-irgramd/telegram.py new-irgramd/telegram.py
--- old-irgramd/telegram.py 2024-11-22 14:58:35.408725836 +0100
+++ new-irgramd/telegram.py 2024-11-22 14:58:35.408725836 +0100
@@ -209,12 +209,16 @@
else:
peer_id, type = self.get_peer_id_and_type(from_id)
if type == 'user':
- user = self.get_irc_user_from_telegram(peer_id)
- if user is None:
- name = '{}'
- self.refwd_me = True
+ try:
+ user = self.get_irc_user_from_telegram(peer_id)
+ except:
+ name = str(peer_id)
else:
- name = user.irc_nick
+ if user is None:
+ name = '{}'
+ self.refwd_me = True
+ else:
+ name = user.irc_nick
else:
try:
name = await self.get_irc_channel_from_telegram_id(peer_id)