mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2024-11-22 09:26:37 +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)
|
packed = chat_hashes.get(entry)
|
||||||
if not packed:
|
if not packed:
|
||||||
# Cannot get channel difference as we're missing its hash
|
# Cannot get channel difference as we're missing its hash
|
||||||
|
# TODO we should probably log this
|
||||||
self.end_get_diff(entry)
|
self.end_get_diff(entry)
|
||||||
# Remove the outdated `pts` entry from the map so that the next update can correct
|
# 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.
|
# it. Otherwise, it will spam that the access hash is missing.
|
||||||
|
@ -614,10 +615,7 @@ class MessageBox:
|
||||||
|
|
||||||
state = self.map.get(entry)
|
state = self.map.get(entry)
|
||||||
if not state:
|
if not state:
|
||||||
# TODO investigate when/why/if this can happen
|
raise RuntimeError('Should not try to get difference for an entry without known state')
|
||||||
# Cannot get channel difference as we're missing its pts
|
|
||||||
self.end_get_diff(entry)
|
|
||||||
return None
|
|
||||||
|
|
||||||
return fn.updates.GetChannelDifferenceRequest(
|
return fn.updates.GetChannelDifferenceRequest(
|
||||||
force=False,
|
force=False,
|
||||||
|
|
Loading…
Reference in New Issue
Block a user