mirror of
https://github.com/eternnoir/pyTelegramBotAPI.git
synced 2023-08-10 21:12:57 +03:00
Merge pull request #1229 from Badiboy/master
Fix CallbackQuery issue for games
This commit is contained in:
commit
9b56afd569
@ -1160,6 +1160,9 @@ class CallbackQuery(JsonDeserializable):
|
||||
def de_json(cls, json_string):
|
||||
if json_string is None: return None
|
||||
obj = cls.check_json(json_string)
|
||||
if not "data" in obj:
|
||||
# "data" field is Optional in the API, but historically is mandatory in the class constructor
|
||||
obj['data'] = None
|
||||
obj['from_user'] = User.de_json(obj.pop('from'))
|
||||
if 'message' in obj:
|
||||
obj['message'] = Message.de_json(obj.get('message'))
|
||||
|
Loading…
Reference in New Issue
Block a user