From 70201a9ff18bd92c37fddb065200050017c5a9b8 Mon Sep 17 00:00:00 2001 From: Lonami Exo Date: Wed, 31 Jan 2024 21:57:30 +0100 Subject: [PATCH] Fix Message finish init for reply_to stories --- 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 805801e8..5dd86ac2 100644 --- a/telethon/tl/custom/message.py +++ b/telethon/tl/custom/message.py @@ -335,7 +335,7 @@ class Message(ChatGetter, SenderGetter, TLObject): self._linked_chat = entities.get(utils.get_peer_id( types.PeerChannel(self.replies.channel_id))) - if self.reply_to: + if isinstance(self.reply_to, types.MessageReplyHeader): if self.reply_to.reply_to_peer_id: self._reply_to_chat = entities.get(utils.get_peer_id(self.reply_to.reply_to_peer_id)) if self.reply_to.reply_from: