From 073d7949dcccdaa18e9ad03e84792f3dd8d36d2d Mon Sep 17 00:00:00 2001 From: Juan Madurga Date: Mon, 30 May 2016 15:59:45 +0200 Subject: [PATCH] fix callbackquery to_dict --- telegram/callbackquery.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/telegram/callbackquery.py b/telegram/callbackquery.py index 440ddce8c..97ab956e2 100644 --- a/telegram/callbackquery.py +++ b/telegram/callbackquery.py @@ -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