mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2024-11-22 09:26:37 +03:00
Fix iter_messages could get stuck on global search
Found thanks to #920. Issue probably introduced in b6d8311
.
This commit is contained in:
parent
ef4f9a962c
commit
b3266fabd8
|
@ -204,6 +204,10 @@ class _MessagesIter(RequestIter):
|
||||||
message._finish_init(self.client, entities, self.entity)
|
message._finish_init(self.client, entities, self.entity)
|
||||||
self.buffer.append(message)
|
self.buffer.append(message)
|
||||||
|
|
||||||
|
# Not a slice (using offset would return the same, with e.g. SearchGlobal).
|
||||||
|
if isinstance(r, types.messages.Messages):
|
||||||
|
return True
|
||||||
|
|
||||||
# Some channels are "buggy" and may return less messages than
|
# Some channels are "buggy" and may return less messages than
|
||||||
# requested (apparently, the messages excluded are, for example,
|
# requested (apparently, the messages excluded are, for example,
|
||||||
# "not displayable due to local laws").
|
# "not displayable due to local laws").
|
||||||
|
|
Loading…
Reference in New Issue
Block a user