Skip to content

Commit 9c67084

Browse files
committed
Merge remote-tracking branch 'origin/master'
2 parents a3fab6a + cc4a850 commit 9c67084

2 files changed

Lines changed: 4 additions & 3 deletions

File tree

pyrogram/types/bots_and_keyboards/inline_keyboard_button.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ async def write(self, client: "pyrogram.Client"):
158158
if self.login_url is not None:
159159
return self.login_url.write(
160160
text=self.text,
161-
bot=await client.resolve_peer(self.login_url.bot_username)
161+
bot=await client.resolve_peer(self.login_url.bot_username or "self")
162162
)
163163

164164
if self.user_id is not None:

pyrogram/types/bots_and_keyboards/login_url.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,8 @@ class LoginUrl(Object):
3131
url (``str``):
3232
An HTTP URL to be opened with user authorization data added to the query string when the button is pressed.
3333
If the user refuses to provide authorization data, the original URL without information about the user will
34-
be opened. The data added is the same as described in Receiving authorization data.
34+
be opened. The data added is the same as described in
35+
`Receiving authorization data <https://core.telegram.org/widgets/login#receiving-authorization-data>`.
3536
3637
**NOTE**: You **must** always check the hash of the received data to verify the authentication and the
3738
integrity of the data as described in
@@ -42,7 +43,7 @@ class LoginUrl(Object):
4243
4344
bot_username (``str``, *optional*):
4445
Username of a bot, which will be used for user authorization.
45-
See `Setting up <https://core.telegram.org/widgets/login#setting-up-a-bot>`_ a bot for more details.
46+
See `Setting up a bot <https://core.telegram.org/widgets/login#setting-up-a-bot>`_ for more details.
4647
If not specified, the current bot's username will be assumed. The url's domain must be the same as the
4748
domain linked with the bot.
4849
See `Linking your domain to the bot <https://core.telegram.org/widgets/login#linking-your-domain-to-the-bot>`_

0 commit comments

Comments
 (0)