mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2025-06-18 02:56:39 +00: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,
|
UpdateEditMessage, UpdateEditChannelMessage, UpdateShort, Updates,
|
||||||
MessageMediaWebPage, ChannelParticipantsSearch, PhotoSize, PhotoCachedSize,
|
MessageMediaWebPage, ChannelParticipantsSearch, PhotoSize, PhotoCachedSize,
|
||||||
PhotoSizeEmpty, MessageService, ChatParticipants, User, WebPage,
|
PhotoSizeEmpty, MessageService, ChatParticipants, User, WebPage,
|
||||||
ChannelParticipantsBanned, ChannelParticipantsKicked
|
ChannelParticipantsBanned, ChannelParticipantsKicked,
|
||||||
|
InputMessagesFilterEmpty
|
||||||
)
|
)
|
||||||
from .tl.types.messages import DialogsSlice
|
from .tl.types.messages import DialogsSlice
|
||||||
from .tl.types.account import PasswordInputSettings, NoPassword
|
from .tl.types.account import PasswordInputSettings, NoPassword
|
||||||
@ -1090,6 +1091,8 @@ class TelegramClient(TelegramBareClient):
|
|||||||
entity = self.get_input_entity(entity)
|
entity = self.get_input_entity(entity)
|
||||||
limit = float('inf') if limit is None else int(limit)
|
limit = float('inf') if limit is None else int(limit)
|
||||||
if search is not None or filter or from_user:
|
if search is not None or filter or from_user:
|
||||||
|
if filter is None:
|
||||||
|
filter = InputMessagesFilterEmpty()
|
||||||
request = SearchRequest(
|
request = SearchRequest(
|
||||||
peer=entity,
|
peer=entity,
|
||||||
q=search or '',
|
q=search or '',
|
||||||
|
Loading…
Reference in New Issue
Block a user