plugin XEP-0050: form returned by completed command are now managed
This commit is contained in:
parent
b207fdd6c9
commit
b2c2dc5e6a
1 changed files with 6 additions and 1 deletions
|
|
@ -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)
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue