From 2874be05ff1c3a688be8043f7eba05db9d29a967 Mon Sep 17 00:00:00 2001 From: Dan <14043624+delivrance@users.noreply.github.com> Date: Thu, 26 Apr 2018 14:17:43 +0200 Subject: [PATCH] Limit replies for pinned messages. Related to #61 --- pyrogram/client/message_parser.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/pyrogram/client/message_parser.py b/pyrogram/client/message_parser.py index b81d649e..c285c704 100644 --- a/pyrogram/client/message_parser.py +++ b/pyrogram/client/message_parser.py @@ -482,7 +482,6 @@ def parse_message( if message.reply_to_msg_id and replies: m.reply_to_message = client.get_messages(m.chat.id, message.reply_to_msg_id, replies=replies - 1) - m.reply_to_message = m.reply_to_message return m @@ -582,8 +581,7 @@ def parse_message_service( ) if isinstance(action, types.MessageActionPinMessage): - m.pinned_message = client.get_messages(m.chat.id, message.reply_to_msg_id) - m.pinned_message = m.pinned_message + m.pinned_message = client.get_messages(m.chat.id, message.reply_to_msg_id, replies=0) return m