diff --git a/src/common/stanza_session.py b/src/common/stanza_session.py index 5469dd086a4c9d3e75fc83a7aad8fab282e4e7ab..0cf337db2914346781ea5f6a39b44fd17d742e88 100644 --- a/src/common/stanza_session.py +++ b/src/common/stanza_session.py @@ -281,6 +281,11 @@ def encrypt(self, encryptable): return self.encrypter.encrypt(padded) def decrypt_stanza(self, stanza): + # delete the unencrypted explanation body, if it exists + orig_body = stanza.getTag('body') + if orig_body: + stanza.delChild(orig_body) + c = stanza.getTag(name='c', namespace='http://www.xmpp.org/extensions/xep-0200.html#ns')