diff options
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' |