From 92ad5f778d1399ac501221b16973eb5c14a75db7 Mon Sep 17 00:00:00 2001 From: fast-geek Date: Mon, 12 Apr 2021 20:42:35 +0300 Subject: [PATCH] Changed from_id type --- telethon/tl/custom/message.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/telethon/tl/custom/message.py b/telethon/tl/custom/message.py index c9f00ba0..243c69cc 100644 --- a/telethon/tl/custom/message.py +++ b/telethon/tl/custom/message.py @@ -210,7 +210,6 @@ class Message(ChatGetter, SenderGetter, TLObject): self.legacy = legacy self.edit_hide = edit_hide self.id = id - self.from_id = from_id self.peer_id = peer_id self.fwd_from = fwd_from self.via_bot_id = via_bot_id @@ -255,6 +254,7 @@ class Message(ChatGetter, SenderGetter, TLObject): # (layer 119+), but the sender can only be the chat we're in. if post or (not out and isinstance(peer_id, types.PeerUser)): sender_id = utils.get_peer_id(peer_id) + self.from_id = sender_id # Note that these calls would reset the client ChatGetter.__init__(self, peer_id, broadcast=post)