Mercurial > libervia-backend
diff src/plugins/plugin_xep_0047.py @ 2129:6a66c8c5a567
core: replaced calls to client.xmlstream.send by client.send which is the right method to use. client.xmlstream should not be used directly
author | Goffi <goffi@goffi.org> |
---|---|
date | Sat, 04 Feb 2017 17:59:13 +0100 |
parents | 2daf7b4c6756 |
children | 1d3f73e065e1 |
line wrap: on
line diff
--- a/src/plugins/plugin_xep_0047.py Wed Feb 01 21:44:24 2017 +0100 +++ b/src/plugins/plugin_xep_0047.py Sat Feb 04 17:59:13 2017 +0100 @@ -189,7 +189,7 @@ client.xmlstream.addOnetimeObserver(event_close, self._onIBBClose, profile=profile) # finally, we send the accept stanza iq_result_elt = xmlstream.toResponse(iq_elt, 'result') - client.xmlstream.send(iq_result_elt) + client.send(iq_result_elt) def _onIBBClose(self, iq_elt, profile): """"Called when an IBB <close> element is received @@ -205,7 +205,7 @@ sid = close_elt['sid'] iq_result_elt = xmlstream.toResponse(iq_elt, 'result') - client.xmlstream.send(iq_result_elt) + client.send(iq_result_elt) self._killSession(sid, client) def _onIBBData(self, element, profile): @@ -261,7 +261,7 @@ # we can now ack success if element.name == 'iq': iq_result_elt = xmlstream.toResponse(element, 'result') - client.xmlstream.send(iq_result_elt) + client.send(iq_result_elt) def _sendError(self, error_condition, sid, iq_elt, client): """Send error stanza @@ -275,7 +275,7 @@ log.warning(u"Error while managing in-band bytestream session, cancelling: {}".format(error_condition)) if sid is not None: self._killSession(sid, client, error_condition) - client.xmlstream.send(iq_elt) + client.send(iq_elt) def startStream(self, file_obj, to_jid, sid, block_size=None, profile=C.PROF_KEY_NONE): """Launch the stream workflow