mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2025-08-08 12:59:46 +00:00
Make use of AlbumHack for all albums
Closes #3916. The new MessageBox system is not designed with "albums come in the same updates container" in mind (in fact, there was a note about this). This version was also not intended to be published to PyPi, but it is, so a workaround must be made for events.Album to remain working. In essence, AlbumHack will always be used even if it technically did not need to be used previously. This will cause a small delay for those updates, but it should not be a major issue.
This commit is contained in:
@@ -260,6 +260,7 @@ class UpdateMethods:
|
||||
await self._dispatch_update(updates_to_dispatch.popleft())
|
||||
else:
|
||||
while updates_to_dispatch:
|
||||
# TODO if _dispatch_update fails for whatever reason, it's not logged! this should be fixed
|
||||
task = self.loop.create_task(self._dispatch_update(updates_to_dispatch.popleft()))
|
||||
self._event_handler_tasks.add(task)
|
||||
task.add_done_callback(lambda _: self._event_handler_tasks.discard(task))
|
||||
|
Reference in New Issue
Block a user