core (xml_tools): dataForm*2XML renamed to dataForm*2XMLUI and now return XMLUI instead of raw XML + submit_id is managed, and session_id is returned if present
This commit is contained in:
parent
80a7423f02
commit
4d15d4a4eb
1 changed files with 15 additions and 15 deletions
|
|
@ -22,7 +22,7 @@ from twisted.words.protocols.jabber.xmlstream import IQ
|
|||
from twisted.words.protocols.jabber import jid
|
||||
from wokkel import data_form
|
||||
from sat.core.exceptions import DataError
|
||||
from sat.tools.xml_tools import dataForm2XML, dataFormResult2XML
|
||||
from sat.tools.xml_tools import dataForm2XMLUI, dataFormResult2XMLUI
|
||||
|
||||
NS_SEARCH = 'jabber:iq:search'
|
||||
|
||||
|
|
@ -79,7 +79,7 @@ class XEP_0055(object):
|
|||
info(_("No data form found"))
|
||||
raise NotImplementedError("Only search through data form is implemented so far")
|
||||
parsed_form = data_form.Form.fromElement(form_elt)
|
||||
return dataForm2XML(parsed_form)
|
||||
return dataForm2XMLUI(parsed_form, "").toXml()
|
||||
|
||||
def _fieldsErr(self, failure, profile):
|
||||
""" Called when something is wrong with fields request """
|
||||
|
|
@ -119,7 +119,7 @@ class XEP_0055(object):
|
|||
except StopIteration:
|
||||
info(_("No data form found"))
|
||||
raise NotImplementedError("Only search through data form is implemented so far")
|
||||
xmlui = dataFormResult2XML(form_elt)
|
||||
xmlui = dataFormResult2XMLUI(form_elt).toXml()
|
||||
print "=== XMLUI ===\n%s\n\n" % xmlui
|
||||
return xmlui
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue