mirror of
https://github.com/pyrogram/pyrogram
synced 2025-08-29 05:18:10 +00:00
Don't encode callback data when sending inline buttons
This commit is contained in:
parent
af937152a1
commit
46e19c395c
@ -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)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user