mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2025-01-27 01:34:29 +03:00
Fix global search would fail if last message had no peer
This commit is contained in:
parent
4683e83287
commit
233daafd96
|
@ -240,7 +240,11 @@ class _MessagesIter(RequestIter):
|
|||
self.request.offset_date = last_message.date
|
||||
|
||||
if isinstance(self.request, functions.messages.SearchGlobalRequest):
|
||||
self.request.offset_peer = last_message.input_chat
|
||||
if last_message.input_chat:
|
||||
self.request.offset_peer = last_message.input_chat
|
||||
else:
|
||||
self.request.offset_peer = types.InputPeerEmpty()
|
||||
|
||||
self.request.offset_rate = getattr(response, 'next_rate', None)
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user