summaryrefslogtreecommitdiff
path: root/slixmpp/stanza/rootstanza.py
diff options
context:
space:
mode:
authormathieui <mathieui@mathieui.net>2015-10-02 19:07:45 +0200
committermathieui <mathieui@mathieui.net>2015-10-02 19:07:45 +0200
commitada9444bf84bd238238c4d22561f69184dd22cdd (patch)
treeceb4f86446b4129ec22cb348f1cb1bd7a151e2da /slixmpp/stanza/rootstanza.py
parent1100ff1febf7e605e03fd9565bdac5fdaa3bf1e0 (diff)
parentacc52fd935b7e74919ad748f3a630596f66c62af (diff)
downloadslixmpp-ada9444bf84bd238238c4d22561f69184dd22cdd.tar.gz
slixmpp-ada9444bf84bd238238c4d22561f69184dd22cdd.tar.bz2
slixmpp-ada9444bf84bd238238c4d22561f69184dd22cdd.tar.xz
slixmpp-ada9444bf84bd238238c4d22561f69184dd22cdd.zip
Merge branch 'sleek-merge'
Diffstat (limited to 'slixmpp/stanza/rootstanza.py')
-rw-r--r--slixmpp/stanza/rootstanza.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/slixmpp/stanza/rootstanza.py b/slixmpp/stanza/rootstanza.py
index ff139382..a6dd958e 100644
--- a/slixmpp/stanza/rootstanza.py
+++ b/slixmpp/stanza/rootstanza.py
@@ -60,7 +60,9 @@ class RootStanza(StanzaBase):
reply.send()
elif isinstance(e, XMPPError):
# We raised this deliberately
+ keep_id = self['id']
reply = self.reply(clear=e.clear)
+ reply['id'] = keep_id
reply['error']['condition'] = e.condition
reply['error']['text'] = e.text
reply['error']['type'] = e.etype
@@ -72,7 +74,9 @@ class RootStanza(StanzaBase):
reply.send()
else:
# We probably didn't raise this on purpose, so send an error stanza
+ keep_id = self['id']
reply = self.reply()
+ reply['id'] = keep_id
reply['error']['condition'] = 'undefined-condition'
reply['error']['text'] = "Slixmpp got into trouble."
reply['error']['type'] = 'cancel'