Telegram should focus and join the group
Telegram focuses, but the group is neither opened nor joined
Operating system: Arch Linux
Version of Telegram Desktop: 2.3.2
Installation source (Linux Only) - the official website / GitHub releases / flatpak / snap / distribution package: https://www.archlinux.org/packages/community/x86_64/telegram-desktop/
Used theme: Night Mode
No Logs Yet:
Insert log.txt here (if necessary)
Are you sure that link that you trying to open is supported in tdesktop? Mobile clients have links that aren't supported by tdesktop afaik.
They disabled the functionality to install URL handler, so it is expected if it doesn't work
https://github.com/archlinux/svntogit-community/blob/packages/telegram-desktop/trunk/PKGBUILD#L43
Are you sure that link that you trying to open is supported in tdesktop? Mobile clients have links that aren't supported by tdesktop afaik.
Yes, it opens in Bettergram correctly.
They disabled the functionality to install URL handler, so it is expected if it doesn't work
https://github.com/archlinux/svntogit-community/blob/packages/telegram-desktop/trunk/PKGBUILD#L43
So if I toggle that flag it'll work as expected?
So if I toggle that flag it'll work as expected?
Yes, it should
But it updates the handler only when detects app update, so you will should trigger handler registration manually by entering registertg like a cheat code in settings (it won't do anything in the current build due to the flag)
What does registertg actually do? Does it add an entry in mimeapps.list so xdg-open can correctly open x-scheme-handler/tg links?
What does
registertgactually do?
calls glib and it does some magic
Elaborate please
Elaborate please
I don't know what glib does under the hood exactly, but it works and other applications are using it as well
Maybe this define should be removed from the source code :thinking:
That's a good idea.
@txtsd
If you are willing and able to reproduce this issue on Arch with tdesktop 2.4.5 I would be very interested in figuring it out. If you can reproduce, please:
$ find ~/.local/share/applications -iname '*telegram*'
$ xdg-mime query default x-scheme-handler/tg
$ grep -i telegram ~/.config/mimeapps.list
$ grep -iEo '[^;]*telegram[^;]*' ~/.local/share/applications/mimeapps.list
about:config and see if a preference named network.protocol-handler.expose.tg existsSo for me it started to work after I switched the Application entry for opening tg links. If I switch it back to Use Telegram Desktop it stops working just like originally reported. If I switch it to Use Telegram Desktop (default) it starts working as intended.
Entries are shown in this screenshot:

@txtsd Thanks! Can you please provide the info requested in my previous message?
位 find ~/.local/share/applications -iname '*telegram*'
位 xdg-mime query default x-scheme-handler/tg
telegramdesktop.desktop
位 grep -i telegram ~/.config/mimeapps.list
x-scheme-handler/tg=telegram.desktop
位 grep -iEo '[^;]*telegram[^;]*' ~/.local/share/applications/mimeapps.list
位
The entry in mimeapps.list was added manually.
And that pref does not exist in my about:config
Thanks @txtsd!
The .desktop file should be called telegramdesktop.desktop, not telegram.desktop as you have manually specified. Do you actually have a telegram.desktop file lurking somewhere? Please remove that from your mimeapps.list and restart firefox.
If that's not the issue, the extra entry is defined somewhere . . . possibly:
about:config matching .tg?grep -i telegram ~/.local/share/applications/mimeinfo.cache ?You're right about telegramdesktop.desktop. I removed the entry from mimeapps.list and restarted firefox.
Nothing in my about:config matches .tg
位 grep -i telegram ~/.local/share/applications/mimeinfo.cache
位
I don't know how to check these -> glib/gsettings/dconf
I don't use a gnome DE, just openbox.
Yeah I'm not sure about what tdesktop might have done, as "does some magic" is the official explanation.
The extra entry in Firefox remains?
Yes, it's still there. Is there anyone more knowledgeable that you can consult?
Maybe @john-preston can enlighten us as to where that extra entry might be defined.