mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2024-11-25 02:43:45 +03:00
Add getting_diff_for assertion in get_channel_difference too
This commit is contained in:
parent
898e279218
commit
7e0639ac57
|
@ -606,6 +606,7 @@ class MessageBox:
|
|||
packed = chat_hashes.get(entry)
|
||||
if not packed:
|
||||
# Cannot get channel difference as we're missing its hash
|
||||
# TODO we should probably log this
|
||||
self.end_get_diff(entry)
|
||||
# Remove the outdated `pts` entry from the map so that the next update can correct
|
||||
# it. Otherwise, it will spam that the access hash is missing.
|
||||
|
@ -614,10 +615,7 @@ class MessageBox:
|
|||
|
||||
state = self.map.get(entry)
|
||||
if not state:
|
||||
# TODO investigate when/why/if this can happen
|
||||
# Cannot get channel difference as we're missing its pts
|
||||
self.end_get_diff(entry)
|
||||
return None
|
||||
raise RuntimeError('Should not try to get difference for an entry without known state')
|
||||
|
||||
return fn.updates.GetChannelDifferenceRequest(
|
||||
force=False,
|
||||
|
|
Loading…
Reference in New Issue
Block a user