core (xmpp): added appCondition argument to sendError

This commit is contained in:
Goffi 2021-05-05 12:58:11 +02:00
commit 672d35d44f

View file

@ -533,13 +533,15 @@ class SatXMPPEntity:
iq_elt.timeout = timeout
return iq_elt
def sendError(self, iq_elt, condition, text=None):
def sendError(self, iq_elt, condition, text=None, appCondition=None):
"""Send error stanza build from iq_elt
@param iq_elt(domish.Element): initial IQ element
@param condition(unicode): error condition
"""
iq_error_elt = error.StanzaError(condition, text=text).toResponse(iq_elt)
iq_error_elt = error.StanzaError(
condition, text=text, appContidtion=appCondition
).toResponse(iq_elt)
self.xmlstream.send(iq_error_elt)
def generateMessageXML(self, data, post_xml_treatments=None):