Skip to content

Commit 182768a

Browse files
committed
Add support for LoginUrl buttons
1 parent a94c3bb commit 182768a

32 files changed

+208
-74
lines changed

compiler/docs/compiler.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -385,6 +385,7 @@ def get_title_list(s: str) -> list:
385385
ReplyKeyboardRemove
386386
InlineKeyboardMarkup
387387
InlineKeyboardButton
388+
LoginUrl
388389
ForceReply
389390
CallbackQuery
390391
GameHighScore

pyrogram/methods/bots/send_game.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ async def send_game(
8080
silent=disable_notification or None,
8181
reply_to_msg_id=reply_to_message_id,
8282
random_id=self.rnd_id(),
83-
reply_markup=reply_markup.write() if reply_markup else None
83+
reply_markup=await reply_markup.write(self) if reply_markup else None
8484
)
8585
)
8686

pyrogram/methods/messages/edit_inline_media.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ async def edit_inline_media(
116116
raw.functions.messages.EditInlineBotMessage(
117117
id=unpacked,
118118
media=media,
119-
reply_markup=reply_markup.write() if reply_markup else None,
119+
reply_markup=await reply_markup.write(self) if reply_markup else None,
120120
**await self.parser.parse(caption, parse_mode)
121121
),
122122
sleep_threshold=self.sleep_threshold

pyrogram/methods/messages/edit_inline_reply_markup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ async def edit_inline_reply_markup(
6161
return await session.send(
6262
raw.functions.messages.EditInlineBotMessage(
6363
id=unpacked,
64-
reply_markup=reply_markup.write() if reply_markup else None,
64+
reply_markup=await reply_markup.write(self) if reply_markup else None,
6565
),
6666
sleep_threshold=self.sleep_threshold
6767
)

pyrogram/methods/messages/edit_inline_text.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ async def edit_inline_text(
8282
raw.functions.messages.EditInlineBotMessage(
8383
id=unpacked,
8484
no_webpage=disable_web_page_preview or None,
85-
reply_markup=reply_markup.write() if reply_markup else None,
85+
reply_markup=await reply_markup.write(self) if reply_markup else None,
8686
**await self.parser.parse(text, parse_mode)
8787
),
8888
sleep_threshold=self.sleep_threshold

pyrogram/methods/messages/edit_message_media.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -257,7 +257,7 @@ async def edit_message_media(
257257
peer=await self.resolve_peer(chat_id),
258258
id=message_id,
259259
media=media,
260-
reply_markup=reply_markup.write() if reply_markup else None,
260+
reply_markup=await reply_markup.write(self) if reply_markup else None,
261261
message=message,
262262
entities=entities
263263
)

pyrogram/methods/messages/edit_message_reply_markup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ async def edit_message_reply_markup(
6262
raw.functions.messages.EditMessage(
6363
peer=await self.resolve_peer(chat_id),
6464
id=message_id,
65-
reply_markup=reply_markup.write() if reply_markup else None,
65+
reply_markup=await reply_markup.write(self) if reply_markup else None,
6666
)
6767
)
6868

pyrogram/methods/messages/edit_message_text.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ async def edit_message_text(
8585
peer=await self.resolve_peer(chat_id),
8686
id=message_id,
8787
no_webpage=disable_web_page_preview or None,
88-
reply_markup=reply_markup.write() if reply_markup else None,
88+
reply_markup=await reply_markup.write(self) if reply_markup else None,
8989
**await utils.parse_text_entities(self, text, parse_mode, entities)
9090
)
9191
)

pyrogram/methods/messages/send_animation.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,7 @@ def progress(current, total):
222222
reply_to_msg_id=reply_to_message_id,
223223
random_id=self.rnd_id(),
224224
schedule_date=schedule_date,
225-
reply_markup=reply_markup.write() if reply_markup else None,
225+
reply_markup=await reply_markup.write(self) if reply_markup else None,
226226
**await utils.parse_text_entities(self, caption, parse_mode, caption_entities)
227227
)
228228
)

pyrogram/methods/messages/send_audio.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,7 @@ def progress(current, total):
217217
reply_to_msg_id=reply_to_message_id,
218218
random_id=self.rnd_id(),
219219
schedule_date=schedule_date,
220-
reply_markup=reply_markup.write() if reply_markup else None,
220+
reply_markup=await reply_markup.write(self) if reply_markup else None,
221221
**await utils.parse_text_entities(self, caption, parse_mode, caption_entities)
222222
)
223223
)

0 commit comments

Comments
 (0)