From d8d9e8df16c07bd13bbac72e4445a2930407b244 Mon Sep 17 00:00:00 2001
From: Lance Stout <lancestout@gmail.com>
Date: Mon, 20 Jun 2011 16:25:56 -0700
Subject: Fix stanza clobbering when replying to errors.

If a stanza handler raised an exception, the exception was processed
and replied by the modified stanza, not a stanza with the original
content.

A copy is now made before handler processing, and if an exception occurs
it is the copy that processes the exception using the original content.
---
 sleekxmpp/stanza/message.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

(limited to 'sleekxmpp/stanza')

diff --git a/sleekxmpp/stanza/message.py b/sleekxmpp/stanza/message.py
index cb3d344c..3518fc7a 100644
--- a/sleekxmpp/stanza/message.py
+++ b/sleekxmpp/stanza/message.py
@@ -97,7 +97,7 @@ class Message(RootStanza):
             clear -- Indicates if existing content should be removed
                      before replying. Defaults to True.
         """
-        StanzaBase.reply(self)
+        StanzaBase.reply(self, clear)
         if self['type'] == 'groupchat':
             self['to'] = self['to'].bare
 
-- 
cgit v1.2.3