mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2024-12-01 22:03:46 +03:00
Stop opening webbrowser on clicking URL buttons
This commit is contained in:
parent
232e76e73a
commit
721c803af9
|
@ -701,6 +701,12 @@ CdnDecrypter has been removed
|
||||||
It was not really working and was more intended to be an implementation detail than anything else.
|
It was not really working and was more intended to be an implementation detail than anything else.
|
||||||
|
|
||||||
|
|
||||||
|
URL buttons no longer open the web-browser
|
||||||
|
------------------------------------------
|
||||||
|
|
||||||
|
Now the URL is returned. You can still use ``webbrowser.open`` to get the old behaviour.
|
||||||
|
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
you can no longer pass an attributes list because the constructor is now nice.
|
you can no longer pass an attributes list because the constructor is now nice.
|
||||||
|
|
|
@ -112,7 +112,7 @@ class MessageButton:
|
||||||
bot=self._bot, peer=self._chat, start_param=self.button.query
|
bot=self._bot, peer=self._chat, start_param=self.button.query
|
||||||
))
|
))
|
||||||
elif isinstance(self.button, _tl.KeyboardButtonUrl):
|
elif isinstance(self.button, _tl.KeyboardButtonUrl):
|
||||||
return webbrowser.open(self.button.url)
|
return self.button.url
|
||||||
elif isinstance(self.button, _tl.KeyboardButtonGame):
|
elif isinstance(self.button, _tl.KeyboardButtonGame):
|
||||||
req = _tl.fn.messages.GetBotCallbackAnswer(
|
req = _tl.fn.messages.GetBotCallbackAnswer(
|
||||||
peer=self._chat, msg_id=self._msg_id, game=True
|
peer=self._chat, msg_id=self._msg_id, game=True
|
||||||
|
|
Loading…
Reference in New Issue
Block a user