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

Reply via email to