Skip to content
Snippets Groups Projects
Commit 0707f1a2 authored by Emmanuel Gil Peyrot's avatar Emmanuel Gil Peyrot
Browse files

Fix xmpp: URI handling.

It was previously removing the first three characters of the JID, and
ignored any URI without an action.
parent 4009625e
No related branches found
No related tags found
No related merge requests found
......@@ -239,13 +239,15 @@ class GajimApplication(Gtk.Application):
for arg in file:
uri = arg.get_uri()
app.log('uri_handler').info('open %s', uri)
# remove xmpp:///
uri = uri[8:]
if not uri.startswith('xmpp:'):
continue
# remove xmpp:
uri = uri[5:]
try:
jid, cmd = uri.split('?')
except ValueError:
# Invalid URI
return
# No query argument
jid, cmd = uri, 'message'
if cmd == 'join':
self.interface.join_gc_minimal(None, jid)
elif cmd == 'roster':
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment