From 2eec7f7491a2c9a2fab1b522ecddb1be57058251 Mon Sep 17 00:00:00 2001 From: souliane Date: Wed, 2 Sep 2015 12:47:23 +0200 Subject: [PATCH] plugin XEP-0050: pre-fill the target server's field with user's host. --- src/plugins/plugin_xep_0050.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/plugins/plugin_xep_0050.py b/src/plugins/plugin_xep_0050.py index 11c221b4..55848417 100644 --- a/src/plugins/plugin_xep_0050.py +++ b/src/plugins/plugin_xep_0050.py @@ -401,7 +401,7 @@ class XEP_0050(object): form_ui.addText(_("Please enter target jid"), 'instructions') form_ui.changeContainer("pairs") form_ui.addLabel("jid") - form_ui.addString("jid") + jid = form_ui.addString("jid", value=self.host.getClient(profile).jid.host) return {'xmlui': form_ui.toXml()} def _statusCallback(self, command_elt, session_data, action, node, profile): @@ -431,7 +431,7 @@ class XEP_0050(object): if show not in SHOWS: raise AdHocError(XEP_0050.ERROR.BAD_PAYLOAD) if show == "disconnect": - self.host.disconnect(profile) + self.host.disconnect(profile) else: self.host.setPresence(show=show, profile_key=profile)