telegram: Fix: use positive chat ids, it seems necessary at least in Telethon v1.24.0
patch 08302dbf9ee8df43f79b27308551499d73115a72
Author: E. Bosch <presidev@AT@gmail.com>
Date: Sat Mar 18 00:08:10 CET 2023
* telegram: Fix: use positive chat ids, it seems necessary at least in Telethon v1.24.0
diff -rN -u old-irgramd/telegram.py new-irgramd/telegram.py
--- old-irgramd/telegram.py 2024-10-23 06:31:08.971477199 +0200
+++ new-irgramd/telegram.py 2024-10-23 06:31:08.971477199 +0200
@@ -142,9 +142,9 @@
async def set_irc_channel_from_telegram(self, chat):
channel = self.get_telegram_channel(chat)
- self.tid_to_iid[-chat.id] = channel
+ self.tid_to_iid[chat.id] = channel
chan = channel.lower()
- self.irc.iid_to_tid[chan] = -chat.id
+ self.irc.iid_to_tid[chan] = chat.id
# Add users from the channel
async for user in self.telegram_client.iter_participants(chat.id):
user_nick = self.set_ircuser_from_telegram(user)