core: replaced calls to client.xmlstream.send by client.send which is the right method to use. client.xmlstream should not be used directly

This commit is contained in:
Goffi 2017-02-04 17:59:13 +01:00
commit 6467bdb3c3
14 changed files with 54 additions and 58 deletions

View file

@ -129,17 +129,17 @@ class XEP_0070(object):
# iq
log.debug(_(u"XEP-0070 reply iq"))
iq_result_elt = xmlstream.toResponse(elt, 'result')
client.xmlstream.send(iq_result_elt)
client.send(iq_result_elt)
elif (stanzaType == MSG):
# message
log.debug(_(u"XEP-0070 reply message"))
msg_result_elt = xmlstream.toResponse(elt, 'result')
msg_result_elt.addChild(elt.elements(NS_HTTP_AUTH, 'confirm').next())
client.xmlstream.send(msg_result_elt)
client.send(msg_result_elt)
else:
log.debug(_(u"XEP-0070 reply error"))
result_elt = jabber.error.StanzaError("not-authorized").toResponse(elt)
client.xmlstream.send(result_elt)
client.send(result_elt)
class XEP_0070_handler(XMPPHandler):