mirror of
https://github.com/python-telegram-bot/python-telegram-bot.git
synced 2025-03-16 12:25:45 +01:00
Merge pull request #317 from jlmadurga/issue/316
Fix callbackquery to_dict
This commit is contained in:
commit
6d08e1bc7f
1 changed files with 11 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue