mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2024-11-22 17:36:34 +03:00
Fix iter_messages + from_user not working without filter
This commit is contained in:
parent
208adc93a6
commit
89182ea010
|
@ -88,7 +88,8 @@ from .tl.types import (
|
|||
UpdateEditMessage, UpdateEditChannelMessage, UpdateShort, Updates,
|
||||
MessageMediaWebPage, ChannelParticipantsSearch, PhotoSize, PhotoCachedSize,
|
||||
PhotoSizeEmpty, MessageService, ChatParticipants, User, WebPage,
|
||||
ChannelParticipantsBanned, ChannelParticipantsKicked
|
||||
ChannelParticipantsBanned, ChannelParticipantsKicked,
|
||||
InputMessagesFilterEmpty
|
||||
)
|
||||
from .tl.types.messages import DialogsSlice
|
||||
from .tl.types.account import PasswordInputSettings, NoPassword
|
||||
|
@ -1090,6 +1091,8 @@ class TelegramClient(TelegramBareClient):
|
|||
entity = self.get_input_entity(entity)
|
||||
limit = float('inf') if limit is None else int(limit)
|
||||
if search is not None or filter or from_user:
|
||||
if filter is None:
|
||||
filter = InputMessagesFilterEmpty()
|
||||
request = SearchRequest(
|
||||
peer=entity,
|
||||
q=search or '',
|
||||
|
|
Loading…
Reference in New Issue
Block a user