Add hacks to properly handle events.Album from other DCs

Fixes #1479.
This commit is contained in:
Lonami Exo
2020-06-06 21:01:02 +02:00
parent faf7263d8f
commit 4b933069f1
3 changed files with 113 additions and 0 deletions

View File

@@ -379,6 +379,15 @@ class TelegramBaseClient(abc.ABC):
# {chat_id: {Conversation}}
self._conversations = collections.defaultdict(set)
# Hack to workaround the fact Telegram may send album updates as
# different Updates when being sent from a different data center.
# {grouped_id: AlbumHack}
#
# FIXME: We don't bother cleaning this up because it's not really
# worth it, albums are pretty rare and this only holds them
# for a second at most.
self._albums = {}
# Default parse mode
self._parse_mode = markdown