# HG changeset patch # User Goffi # Date 1402759582 -7200 # Node ID eef1f200d733b25a746ae15584c4c925d40239a1 # Parent ad023e60da8c9486ee3f00730962adee1652899d plugin XEP-0050: form returned by completed command are now managed diff -r ad023e60da8c -r eef1f200d733 src/plugins/plugin_xep_0050.py --- a/src/plugins/plugin_xep_0050.py Sat Jun 14 17:25:08 2014 +0200 +++ b/src/plugins/plugin_xep_0050.py Sat Jun 14 17:26:22 2014 +0200 @@ -255,11 +255,16 @@ 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)