core, plugins: fixed bad namespace in stanza creation

This commit is contained in:
Goffi 2012-11-01 22:41:39 +01:00
commit a6d8990e49

View file

@ -124,9 +124,9 @@ class XEP_0095():
@param data: error specific data (dictionary)
@param profile: %(doc_profile)s
"""
client = self.host.getClient(profile)
assert(client)
result = domish.Element(('', 'iq'))
_client = self.host.getClient(profile)
assert(_client)
result = domish.Element((None, 'iq'))
result['type'] = 'result'
result['id'] = iq_id
result['to'] = to_jid
@ -148,7 +148,7 @@ class XEP_0095():
if data.has_key('custom') and data['custom']=='failed':
condition_el.addContent('Stream failed')
client.xmlstream.send(result)
_client.xmlstream.send(result)
def acceptStream(self, iq_id, to_jid, feature_elt, misc_elts=[], profile='@NONE@'):
"""Send the accept stream initiation answer
@ -156,10 +156,10 @@ class XEP_0095():
@param feature_elt: domish element 'feature' containing stream method to use
@param misc_elts: list of domish element to add
@param profile: %(doc_profile)s"""
client = self.host.getClient(profile)
assert(client)
_client = self.host.getClient(profile)
assert(_client)
info (_("sending stream initiation accept answer"))
result = domish.Element(('', 'iq'))
result = domish.Element((None, 'iq'))
result['type'] = 'result'
result['id'] = iq_id
result['to'] = to_jid
@ -167,7 +167,7 @@ class XEP_0095():
si.addChild(feature_elt)
for elt in misc_elts:
si.addChild(elt)
client.xmlstream.send(result)
_client.xmlstream.send(result)
def proposeStream(self, to_jid, si_profile, feature_elt, misc_elts, mime_type='application/octet-stream', profile_key='@NONE@'):
"""Propose a stream initiation