Skip to content

Commit f0138ce

Browse files
committed
Fix Inline buttons parsing
1 parent 921800f commit f0138ce

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

pyrogram/client/types/bots/inline_keyboard_button.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -110,21 +110,21 @@ def read(o):
110110
)
111111

112112
def write(self):
113-
if self.callback_data:
113+
if self.callback_data is not None:
114114
return KeyboardButtonCallback(text=self.text, data=self.callback_data)
115115

116-
if self.url:
116+
if self.url is not None:
117117
return KeyboardButtonUrl(text=self.text, url=self.url)
118118

119-
if self.switch_inline_query:
119+
if self.switch_inline_query is not None:
120120
return KeyboardButtonSwitchInline(text=self.text, query=self.switch_inline_query)
121121

122-
if self.switch_inline_query_current_chat:
122+
if self.switch_inline_query_current_chat is not None:
123123
return KeyboardButtonSwitchInline(
124124
text=self.text,
125125
query=self.switch_inline_query_current_chat,
126126
same_peer=True
127127
)
128128

129-
if self.callback_game:
129+
if self.callback_game is not None:
130130
return KeyboardButtonGame(text=self.text)

0 commit comments

Comments
 (0)