2
0
mirror of https://github.com/pyrogram/pyrogram synced 2025-08-28 12:57:52 +00:00

Don't encode callback data when sending inline buttons

This commit is contained in:
Dan 2018-11-04 11:36:10 +01:00
parent af937152a1
commit 46e19c395c

View File

@ -59,7 +59,7 @@ class InlineKeyboardButton(Object):
def __init__(
self,
text: str,
callback_data: str = None,
callback_data: bytes = None,
url: str = None,
switch_inline_query: str = None,
switch_inline_query_current_chat: str = None,
@ -102,7 +102,7 @@ class InlineKeyboardButton(Object):
def write(self):
if self.callback_data:
return KeyboardButtonCallback(self.text, self.callback_data.encode())
return KeyboardButtonCallback(self.text, self.callback_data)
if self.url:
return KeyboardButtonUrl(self.text, self.url)