1
0
mirror of https://github.com/eternnoir/pyTelegramBotAPI.git synced 2023-08-10 21:12:57 +03:00

Message add forward_from forward_date reply_to_message support.

This commit is contained in:
eternnoir 2015-07-17 14:40:49 +08:00
parent 4870764b66
commit 6bdc313fa6

View File

@ -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'