From 6bdc313fa6919fcb3d4e31eb4993e050fbf339de Mon Sep 17 00:00:00 2001 From: eternnoir Date: Fri, 17 Jul 2015 14:40:49 +0800 Subject: [PATCH] Message add forward_from forward_date reply_to_message support. --- telebot/types.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/telebot/types.py b/telebot/types.py index 5bf3eb9..34c61f7 100644 --- a/telebot/types.py +++ b/telebot/types.py @@ -114,6 +114,12 @@ class Message(JsonDeserializable): date = obj['date'] content_type = None opts = {} + if 'forward_from' in obj: + opts['forward_from'] = User.de_json(obj['forward_from']) + if 'forward_date' in obj: + opts['forward_date'] = obj['forward_date'] + if 'reply_to_message' in obj: + opts['reply_to_message'] = Message.de_json(obj['reply_to_message']) if 'text' in obj: opts['text'] = obj['text'] content_type = 'text'