mirror of
https://github.com/python-telegram-bot/python-telegram-bot.git
synced 2024-11-21 22:56:38 +01:00
fix callbackquery to_dict
This commit is contained in:
parent
f8a9722573
commit
073d7949dc
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…
Reference in a new issue