mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2024-11-25 19:03:46 +03:00
Assert getting_diff_for is not filled when not possible in get_difference
This commit is contained in:
parent
a38170d26a
commit
898e279218
|
@ -520,16 +520,15 @@ class MessageBox:
|
||||||
def get_difference(self):
|
def get_difference(self):
|
||||||
for entry in (ENTRY_ACCOUNT, ENTRY_SECRET):
|
for entry in (ENTRY_ACCOUNT, ENTRY_SECRET):
|
||||||
if entry in self.getting_diff_for:
|
if entry in self.getting_diff_for:
|
||||||
if entry in self.map:
|
if entry not in self.map:
|
||||||
return fn.updates.GetDifferenceRequest(
|
raise RuntimeError('Should not try to get difference for an entry without known state')
|
||||||
pts=self.map[ENTRY_ACCOUNT].pts,
|
|
||||||
pts_total_limit=None,
|
return fn.updates.GetDifferenceRequest(
|
||||||
date=self.date,
|
pts=self.map[ENTRY_ACCOUNT].pts,
|
||||||
qts=self.map[ENTRY_SECRET].pts if ENTRY_SECRET in self.map else NO_SEQ,
|
pts_total_limit=None,
|
||||||
)
|
date=self.date,
|
||||||
else:
|
qts=self.map[ENTRY_SECRET].pts if ENTRY_SECRET in self.map else NO_SEQ,
|
||||||
# TODO investigate when/why/if this can happen
|
)
|
||||||
self.end_get_diff(entry)
|
|
||||||
|
|
||||||
return None
|
return None
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user