mirror of
https://github.com/pyrogram/pyrogram
synced 2025-09-03 07:45:14 +00:00
Don't encode callback data when sending inline buttons
This commit is contained in:
@@ -59,7 +59,7 @@ class InlineKeyboardButton(Object):
|
|||||||
def __init__(
|
def __init__(
|
||||||
self,
|
self,
|
||||||
text: str,
|
text: str,
|
||||||
callback_data: str = None,
|
callback_data: bytes = None,
|
||||||
url: str = None,
|
url: str = None,
|
||||||
switch_inline_query: str = None,
|
switch_inline_query: str = None,
|
||||||
switch_inline_query_current_chat: str = None,
|
switch_inline_query_current_chat: str = None,
|
||||||
@@ -102,7 +102,7 @@ class InlineKeyboardButton(Object):
|
|||||||
|
|
||||||
def write(self):
|
def write(self):
|
||||||
if self.callback_data:
|
if self.callback_data:
|
||||||
return KeyboardButtonCallback(self.text, self.callback_data.encode())
|
return KeyboardButtonCallback(self.text, self.callback_data)
|
||||||
|
|
||||||
if self.url:
|
if self.url:
|
||||||
return KeyboardButtonUrl(self.text, self.url)
|
return KeyboardButtonUrl(self.text, self.url)
|
||||||
|
Reference in New Issue
Block a user