mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2025-03-24 11:54:29 +03:00
Fix getting messages by ID for private chats
This commit is contained in:
parent
4e07712b04
commit
db8bea3968
|
@ -800,7 +800,7 @@ class MessageMethods(UploadMethods, ButtonMethods, MessageParseMethods):
|
||||||
# arbitrary chats. Validate these unless ``from_id is None``.
|
# arbitrary chats. Validate these unless ``from_id is None``.
|
||||||
for message in r.messages:
|
for message in r.messages:
|
||||||
if isinstance(message, types.MessageEmpty) or (
|
if isinstance(message, types.MessageEmpty) or (
|
||||||
from_id and utils.get_peer_id(message.to_id) != from_id):
|
from_id and message.chat_id != from_id):
|
||||||
await yield_(None)
|
await yield_(None)
|
||||||
else:
|
else:
|
||||||
message._finish_init(self, entities, entity)
|
message._finish_init(self, entities, entity)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user