Misc updates for send_error()
This commit is contained in:
parent
d60a652259
commit
1345b7c1d0
@ -136,12 +136,12 @@ class XEP_0332(BasePlugin):
|
|||||||
timeout_callback=kwargs.get('timeout_callback', None)
|
timeout_callback=kwargs.get('timeout_callback', None)
|
||||||
)
|
)
|
||||||
|
|
||||||
def send_error(self, to=None, ecode=500, etype='wait',
|
def send_error(self, to=None, ecode='500', etype='wait',
|
||||||
econd='internal-server-error', **kwargs):
|
econd='internal-server-error', **kwargs):
|
||||||
iq = self.xmpp.Iq()
|
iq = self.xmpp.Iq()
|
||||||
iq['type'] = 'error'
|
|
||||||
iq['from'] = self.xmpp.boundjid
|
iq['from'] = self.xmpp.boundjid
|
||||||
iq['to'] = to
|
iq['to'] = to
|
||||||
|
iq['type'] = 'error'
|
||||||
iq['error']['code'] = ecode
|
iq['error']['code'] = ecode
|
||||||
iq['error']['type'] = etype
|
iq['error']['type'] = etype
|
||||||
iq['error']['condition'] = econd
|
iq['error']['condition'] = econd
|
||||||
|
Loading…
Reference in New Issue
Block a user