From 38944331b38a5b33fac3b85d9f5e4af29b49976e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Philipp=20H=C3=B6rist?= Date: Mon, 4 Dec 2017 00:16:58 +0100 Subject: [PATCH] Handle ?message uris --- gajim/gajim.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/gajim/gajim.py b/gajim/gajim.py index 3e51221f4..17cc41d81 100644 --- a/gajim/gajim.py +++ b/gajim/gajim.py @@ -244,6 +244,17 @@ class GajimApplication(Gtk.Application): self.interface.join_gc_minimal(None, jid) elif cmd == 'roster': self.activate_action('add-contact', GLib.Variant('s', jid)) + elif cmd == 'message': + from gajim.common import app + accounts = list(app.connections.keys()) + if not accounts: + continue + if len(accounts) == 1: + app.interface.new_chat_from_jid(accounts[0], jid) + else: + self.activate_action('start-chat') + start_chat_window = app.interface.instances['start_chat'] + start_chat_window.search_entry.set_text(jid) def do_shutdown(self, *args): Gtk.Application.do_shutdown(self)