From 0707f1a27cd8e17db046a2ba3d29c33c31cc2938 Mon Sep 17 00:00:00 2001 From: Emmanuel Gil Peyrot Date: Fri, 15 Dec 2017 02:40:53 +0100 Subject: [PATCH] Fix xmpp: URI handling. It was previously removing the first three characters of the JID, and ignored any URI without an action. --- gajim/gajim.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/gajim/gajim.py b/gajim/gajim.py index 6f1bbaa3e..3c61155ee 100644 --- a/gajim/gajim.py +++ b/gajim/gajim.py @@ -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':