From 6238f984b4a15bb03134d5dacca644ae86ad55eb Mon Sep 17 00:00:00 2001 From: Dan <14043624+delivrance@users.noreply.github.com> Date: Wed, 6 Jun 2018 12:29:05 +0200 Subject: [PATCH] Add dedicated parse function for inline callback queries --- pyrogram/client/ext/utils.py | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/pyrogram/client/ext/utils.py b/pyrogram/client/ext/utils.py index 2d43757f..d7a09ee1 100644 --- a/pyrogram/client/ext/utils.py +++ b/pyrogram/client/ext/utils.py @@ -810,6 +810,24 @@ def parse_callback_query(client, callback_query, users): ) +def parse_inline_callback_query(callback_query, users): + return pyrogram_types.CallbackQuery( + id=str(callback_query.query_id), + from_user=parse_user(users[callback_query.user_id]), + chat_instance=str(callback_query.chat_instance), + inline_message_id=b64encode( + pack( + "