comparison src/plugins/plugin_xep_0070.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 438a49dbfe87
children 1d3f73e065e1
comparison
equal deleted inserted replaced
2128:aa94f33fd2ad 2129:6a66c8c5a567
127 if authorized: 127 if authorized:
128 if (stanzaType == IQ): 128 if (stanzaType == IQ):
129 # iq 129 # iq
130 log.debug(_(u"XEP-0070 reply iq")) 130 log.debug(_(u"XEP-0070 reply iq"))
131 iq_result_elt = xmlstream.toResponse(elt, 'result') 131 iq_result_elt = xmlstream.toResponse(elt, 'result')
132 client.xmlstream.send(iq_result_elt) 132 client.send(iq_result_elt)
133 elif (stanzaType == MSG): 133 elif (stanzaType == MSG):
134 # message 134 # message
135 log.debug(_(u"XEP-0070 reply message")) 135 log.debug(_(u"XEP-0070 reply message"))
136 msg_result_elt = xmlstream.toResponse(elt, 'result') 136 msg_result_elt = xmlstream.toResponse(elt, 'result')
137 msg_result_elt.addChild(elt.elements(NS_HTTP_AUTH, 'confirm').next()) 137 msg_result_elt.addChild(elt.elements(NS_HTTP_AUTH, 'confirm').next())
138 client.xmlstream.send(msg_result_elt) 138 client.send(msg_result_elt)
139 else: 139 else:
140 log.debug(_(u"XEP-0070 reply error")) 140 log.debug(_(u"XEP-0070 reply error"))
141 result_elt = jabber.error.StanzaError("not-authorized").toResponse(elt) 141 result_elt = jabber.error.StanzaError("not-authorized").toResponse(elt)
142 client.xmlstream.send(result_elt) 142 client.send(result_elt)
143 143
144 144
145 class XEP_0070_handler(XMPPHandler): 145 class XEP_0070_handler(XMPPHandler):
146 implements(iwokkel.IDisco) 146 implements(iwokkel.IDisco)
147 147