Limit replies for pinned messages. Related to #61

This commit is contained in:
Dan 2018-04-26 14:17:43 +02:00
parent 739779c29d
commit 2874be05ff

View File

@ -482,7 +482,6 @@ def parse_message(
if message.reply_to_msg_id and replies: 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 = client.get_messages(m.chat.id, message.reply_to_msg_id, replies=replies - 1)
m.reply_to_message = m.reply_to_message
return m return m
@ -582,8 +581,7 @@ def parse_message_service(
) )
if isinstance(action, types.MessageActionPinMessage): if isinstance(action, types.MessageActionPinMessage):
m.pinned_message = client.get_messages(m.chat.id, message.reply_to_msg_id) m.pinned_message = client.get_messages(m.chat.id, message.reply_to_msg_id, replies=0)
m.pinned_message = m.pinned_message
return m return m