Mercurial > libervia-backend
diff src/plugins/plugin_xep_0095.py @ 536:a31abb97310d
core, plugins: fixed bad namespace in stanza creation
author | Goffi <goffi@goffi.org> |
---|---|
date | Thu, 01 Nov 2012 22:41:39 +0100 |
parents | 2a072735e459 |
children | ca13633d3b6b |
line wrap: on
line diff
--- a/src/plugins/plugin_xep_0095.py Thu Nov 01 19:52:59 2012 +0100 +++ b/src/plugins/plugin_xep_0095.py Thu Nov 01 22:41:39 2012 +0100 @@ -124,9 +124,9 @@ @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 @@ 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 @@ @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 @@ 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