fix forwards

This commit is contained in:
bakatrouble 2021-03-12 13:17:33 +03:00
parent 88c6667a2e
commit aa3359ca8b

View File

@ -356,7 +356,9 @@ def _process_message(bot: Bot, m: Message):
reply_to_message_id = user.messages_reverse.get(reply_to_message_internal_id, None) reply_to_message_id = user.messages_reverse.get(reply_to_message_internal_id, None)
try: try:
r = func(*([uid] + args), **kwargs, reply_to_message_id=reply_to_message_id) if func != m.forward:
kwargs['reply_to_message_id'] = reply_to_message_id
r = func(*([uid] + args), **kwargs)
if r: if r:
user.update_from_message(r) user.update_from_message(r)
user.messages_forward[r.message_id] = conn.root.counter user.messages_forward[r.message_id] = conn.root.counter