There was an error while loading. Please reload this page.
2 parents a3fab6a + cc4a850 commit 9c67084Copy full SHA for 9c67084
2 files changed
pyrogram/types/bots_and_keyboards/inline_keyboard_button.py
@@ -158,7 +158,7 @@ async def write(self, client: "pyrogram.Client"):
158
if self.login_url is not None:
159
return self.login_url.write(
160
text=self.text,
161
- bot=await client.resolve_peer(self.login_url.bot_username)
+ bot=await client.resolve_peer(self.login_url.bot_username or "self")
162
)
163
164
if self.user_id is not None:
pyrogram/types/bots_and_keyboards/login_url.py
@@ -31,7 +31,8 @@ class LoginUrl(Object):
31
url (``str``):
32
An HTTP URL to be opened with user authorization data added to the query string when the button is pressed.
33
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.
+ be opened. The data added is the same as described in
35
+ `Receiving authorization data <https://core.telegram.org/widgets/login#receiving-authorization-data>`.
36
37
**NOTE**: You **must** always check the hash of the received data to verify the authentication and the
38
integrity of the data as described in
@@ -42,7 +43,7 @@ class LoginUrl(Object):
42
43
44
bot_username (``str``, *optional*):
45
Username of a bot, which will be used for user authorization.
- 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.
47
If not specified, the current bot's username will be assumed. The url's domain must be the same as the
48
domain linked with the bot.
49
See `Linking your domain to the bot <https://core.telegram.org/widgets/login#linking-your-domain-to-the-bot>`_
0 commit comments