From 118fb78c41cd5911d98be8b9cd5a3799a0824bcd Mon Sep 17 00:00:00 2001 From: Mustafa Asaad Date: Tue, 8 Mar 2022 22:29:25 +0300 Subject: [PATCH] Added the field is_automatic_forward to the class Message. --- tgbotapi/types.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tgbotapi/types.py b/tgbotapi/types.py index 5378930..dda330a 100644 --- a/tgbotapi/types.py +++ b/tgbotapi/types.py @@ -273,6 +273,7 @@ def __init__(self, message_id, from_user, sender_chat, date, chat, options): self.forward_from_message_id = None self.forward_from = None self.forward_date = None + self.is_automatic_forward = False self.reply_to_message = None self.via_bot = None self.has_protected_content = False @@ -343,6 +344,8 @@ def de_json(cls, obj_type): opts['forward_signature'] = obj['forward_signature'] if 'forward_date' in obj: opts['forward_date'] = obj['forward_date'] + if 'is_automatic_forward' in obj: + opts['is_automatic_forward'] = obj['is_automatic_forward'] if 'reply_to_message' in obj: opts['reply_to_message'] = Message.de_json(obj['reply_to_message']) if 'via_bot' in obj: