diff options
author | mathieui <mathieui@mathieui.net> | 2015-10-02 19:07:45 +0200 |
---|---|---|
committer | mathieui <mathieui@mathieui.net> | 2015-10-02 19:07:45 +0200 |
commit | ada9444bf84bd238238c4d22561f69184dd22cdd (patch) | |
tree | ceb4f86446b4129ec22cb348f1cb1bd7a151e2da /slixmpp/stanza/rootstanza.py | |
parent | 1100ff1febf7e605e03fd9565bdac5fdaa3bf1e0 (diff) | |
parent | acc52fd935b7e74919ad748f3a630596f66c62af (diff) | |
download | slixmpp-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.py | 4 |
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' |