mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2024-11-21 17:06:36 +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)
|
||||
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
|
||||
# requested (apparently, the messages excluded are, for example,
|
||||
# "not displayable due to local laws").
|
||||
|
|
Loading…
Reference in New Issue
Block a user