mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2025-08-08 12:59:46 +00:00
Fix getting messages by ID for private chats
This commit is contained in:
@@ -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)
|
||||||
|
Reference in New Issue
Block a user