mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2024-11-22 01:16:35 +03:00
Link clarification and include privatepost URL
parent
5c8a495fb7
commit
1e16c2d729
|
@ -1,7 +1,9 @@
|
|||
There are certain link types that are recognised by the official Telegram applications and cause them to perform certain actions. While Telethon currently offers no way to parse and react to these, they may still be useful to know, so that you can make use of them if you develop an application (like a bot).
|
||||
|
||||
# HTTP links:
|
||||
* https://t.me/bot?start=foo. Starts `@bot` with parameter `foo`. Note that the maximum length for the start command is 64 alphanumerical characters.
|
||||
* https://t.me/share/url?url=foo. Lets the user select a chat and have their input be `foo`.
|
||||
* https://t.me/c/chat_id/msg_id. Opens the chat with ID `chat_id` and highlights the message with ID `msg_id`. Note that the `msg_id` doesn't seem optional.
|
||||
* https://t.me/c/chat_id/msg_id. Opens the chat with ID `chat_id` and highlights the message with ID `msg_id`. Note that the `msg_id` doesn't seem optional. Note that the chat must be a channel (megagroup or broadcast).
|
||||
|
||||
## Links documented under [@DeepLink](https://t.me/DeepLink):
|
||||
* https://telegram.me
|
||||
|
@ -46,6 +48,7 @@ With any of those URLs, the following paths may be used:
|
|||
# TG links:
|
||||
* [tg://resolve?domain=bot&start=foo](https://t.me/bot?start=foo). Starts @bot with parameter "foo".
|
||||
* [tg://openmessage?chat_id=123&message_id=456](https://t.me/openmessage?chat_id=123&message_id=456). Should go to the message `456` from chat `123`.
|
||||
* tg://privatepost?channel=123&post=456. Should go to the message `456` inside the channel (or megagroup) `123`.
|
||||
|
||||
## Links documented under [@DeepLink](https://t.me/DeepLink):
|
||||
* tg://resolve
|
||||
|
@ -117,6 +120,6 @@ With any of those URLs, the following paths may be used:
|
|||
|
||||
---
|
||||
|
||||
More can be found in [`tdesktop`'s `click_handler_types.cpp`](https://github.com/telegramdesktop/tdesktop/blob/v1.5.5/Telegram/SourceFiles/core/click_handler_types.cpp#L34-L69).
|
||||
More can be found in [`tdesktop`'s `click_handler_types.cpp`](https://github.com/telegramdesktop/tdesktop/blob/v1.5.5/Telegram/SourceFiles/core/click_handler_types.cpp#L34-L69) or [`local_url_handlers.cpp`](https://github.com/telegramdesktop/tdesktop/blob/9f6fc3a4c834a8fb0f81f7bd2b985e8be8bd643d/Telegram/SourceFiles/core/local_url_handlers.cpp).
|
||||
|
||||
The links/urls might be platform-/client-specific and as such might not work on every client. If you really need to use some special link make sure it works on all platforms.
|
||||
|
|
Loading…
Reference in New Issue
Block a user