T.me link handling
alvitg opened this issue · 2 comments
alvitg commented
Please enable proper handling of links like https://t.me/durov_russia/29 Just now clicking such a link in Fernshriber tends to USERNAME_INVALID message.
jgibbon commented
While it's not really documented in a traditional way, a look at the Telegram Desktop source will help find some more examples:
const std::vector<LocalUrlHandler> &LocalUrlHandlers()
(and the methods it calls) in
https://github.com/telegramdesktop/tdesktop/blob/dev/Telegram/SourceFiles/core/local_url_handlers.cpp give kind of an overview.
jgibbon commented
This seems to belong to a bunch of related issues: #151, #276, #312, #412 (this comment is copied to all of them)
Proposed way to hopefully fix most of them:
- use
MimeType=x-url-handler
(caveat: according to link,update-desktop-database
isn't called after installation yet…) - implement at least some of the missing url functions (link in #312 – search for
LocalUrlHandlers
; also look below) - on start: scan for existing .desktop file, delete.
- link handler: save "active link" to some temporary property until tg is authenticated, only then process it.