XMPPError exceptions can keep a stanza's contents.
This allows exceptions to include the original content of a stanza in the error response by including the parameter clear=False when raising the exception.
This commit is contained in:
@@ -104,7 +104,7 @@ class Message(RootStanza):
|
||||
self['type'] = 'normal'
|
||||
return self
|
||||
|
||||
def reply(self, body=None):
|
||||
def reply(self, body=None, clear=True):
|
||||
"""
|
||||
Create a message reply.
|
||||
|
||||
@@ -114,7 +114,9 @@ class Message(RootStanza):
|
||||
adds a message body if one is given.
|
||||
|
||||
Arguments:
|
||||
body -- Optional text content for the message.
|
||||
body -- Optional text content for the message.
|
||||
clear -- Indicates if existing content should be removed
|
||||
before replying. Defaults to True.
|
||||
"""
|
||||
StanzaBase.reply(self)
|
||||
if self['type'] == 'groupchat':
|
||||
|
Reference in New Issue
Block a user