patch 830950349c796059b0bbe9759c277846252d6db6
Author: E. Bosch <presidev@AT@gmail.com>
Date: Wed Mar 22 22:15:41 CET 2023
* telegram: Use positive IDs when checking if a channel already exists when a new message is received
hunk ./telegram.py 17
-from telethon import types as tgty
+from telethon import types as tgty, utils as tgutils
hunk ./telegram.py 200
- if tid not in self.tid_to_iid:
+ rtid, type = tgutils.resolve_id(tid)
+ if rtid not in self.tid_to_iid:
hunk ./telegram.py 204
- self.tid_to_iid[tid] = channel
- self.irc.iid_to_tid[channel] = tid
-
- return self.tid_to_iid[tid]
+ self.tid_to_iid[rtid] = channel
+ self.irc.iid_to_tid[channel] = rtid
+
+ return self.tid_to_iid[rtid]