mirror of
https://github.com/eternnoir/pyTelegramBotAPI.git
synced 2023-08-10 21:12:57 +03:00
Added source data (json_string) to CallbackQuery
This commit is contained in:
parent
0aa9f0fb42
commit
81cbddb8cd
@ -1248,9 +1248,10 @@ class CallbackQuery(JsonDeserializable):
|
|||||||
obj['from_user'] = User.de_json(obj.pop('from'))
|
obj['from_user'] = User.de_json(obj.pop('from'))
|
||||||
if 'message' in obj:
|
if 'message' in obj:
|
||||||
obj['message'] = Message.de_json(obj.get('message'))
|
obj['message'] = Message.de_json(obj.get('message'))
|
||||||
|
obj['json_string'] = json_string
|
||||||
return cls(**obj)
|
return cls(**obj)
|
||||||
|
|
||||||
def __init__(self, id, from_user, data, chat_instance, message=None, inline_message_id=None, game_short_name=None, **kwargs):
|
def __init__(self, id, from_user, data, chat_instance, json_string, message=None, inline_message_id=None, game_short_name=None, **kwargs):
|
||||||
self.id: int = id
|
self.id: int = id
|
||||||
self.from_user: User = from_user
|
self.from_user: User = from_user
|
||||||
self.message: Message = message
|
self.message: Message = message
|
||||||
@ -1258,6 +1259,7 @@ class CallbackQuery(JsonDeserializable):
|
|||||||
self.chat_instance: str = chat_instance
|
self.chat_instance: str = chat_instance
|
||||||
self.data: str = data
|
self.data: str = data
|
||||||
self.game_short_name: str = game_short_name
|
self.game_short_name: str = game_short_name
|
||||||
|
self.json = json_string
|
||||||
|
|
||||||
|
|
||||||
class ChatPhoto(JsonDeserializable):
|
class ChatPhoto(JsonDeserializable):
|
||||||
|
Loading…
Reference in New Issue
Block a user