From b2c2dc5e6a1633eb4b86aa29a441066b739b214c Mon Sep 17 00:00:00 2001 From: Goffi Date: Sat, 14 Jun 2014 17:26:22 +0200 Subject: [PATCH] plugin XEP-0050: form returned by completed command are now managed --- src/plugins/plugin_xep_0050.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/plugins/plugin_xep_0050.py b/src/plugins/plugin_xep_0050.py index 06a7429d..dcf19d26 100644 --- a/src/plugins/plugin_xep_0050.py +++ b/src/plugins/plugin_xep_0050.py @@ -255,11 +255,16 @@ class XEP_0050(object): if status in [XEP_0050.STATUS.COMPLETED, XEP_0050.STATUS.CANCELED]: # the command session is finished, we purge our session del self.requesting[session_id] - return None + if status == XEP_0050.STATUS.COMPLETED: + session_id = None + else: + return None remote_session_id = command_elt.getAttribute('sessionid') if remote_session_id: session_data['remote_id'] = remote_session_id data_elt = command_elt.elements(data_form.NS_X_DATA, 'x').next() + if session_id is None: + return xml_tools.dataFormResult2XMLUI(data_elt) form = data_form.Form.fromElement(data_elt) return xml_tools.dataForm2XMLUI(form, self.__requesting_id, session_id=session_id)