D12896: Add Telegram plugin
Nicolas Fella
noreply at phabricator.kde.org
Wed May 23 17:19:11 UTC 2018
nicolasfella added a comment.
I played around a bit and it turns out more difficult than expected.
- telegram-desktop-bin from AUR has telegramdesktop.desktop whereas the Flatpak version has org.telegram.desktop.desktop, so we would need to look for at least those desktop files
- the flatpak command needs @@ around the url, the AUR version not
- the flatpak command contains "--" which hinders the appending of the -sendpath parameter
This makes parsing the desktop file and building the correct command utterly complex and when we know whether its flatpak or not we know the overall command
My much simpler suggestion would be hardcoding the two commands and try them all until we succeed.
Those would be
telegram-desktop $URL (regular package)
/usr/bin/flatpak run --file-forwarding org.telegram.desktop -sendpath @@ $URL @@ (flatpak)
More commands (e.g. for Snap) could be added, making it more maintainable than complex and error-prone parsing (which would also rely on case-handling and assumptions)
REPOSITORY
R495 Purpose Library
REVISION DETAIL
https://phabricator.kde.org/D12896
To: nicolasfella, apol
Cc: ngraham, kde-frameworks-devel, apol, michaelh, bruns
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20180523/60a5e9f6/attachment.html>
More information about the Kde-frameworks-devel
mailing list