fix callbackquery to_dict

This commit is contained in:
Juan Madurga 2016-05-30 15:59:45 +02:00
parent f8a9722573
commit 073d7949dc

View file

@ -43,3 +43,14 @@ class CallbackQuery(TelegramObject):
data['message'] = Message.de_json(data.get('message'))
return CallbackQuery(**data)
def to_dict(self):
"""
Returns:
dict:
"""
data = super(CallbackQuery, self).to_dict()
# Required
data['from'] = data.pop('from_user', None)
return data