changeset 3522:41a6c144dc90

core (xmpp): added `appCondition` argument to `sendError`
author Goffi <goffi@goffi.org>
date Wed, 05 May 2021 12:58:11 +0200
parents 62f490eff51c
children 30779935c0aa
files sat/core/xmpp.py
diffstat 1 files changed, 4 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/sat/core/xmpp.py	Sat May 01 18:39:34 2021 +0200
+++ b/sat/core/xmpp.py	Wed May 05 12:58:11 2021 +0200
@@ -533,13 +533,15 @@
         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):