diff options
-rw-r--r-- | poezio/plugin_e2ee.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/poezio/plugin_e2ee.py b/poezio/plugin_e2ee.py index 91b1a22e..357a9678 100644 --- a/poezio/plugin_e2ee.py +++ b/poezio/plugin_e2ee.py @@ -251,8 +251,12 @@ class E2EEPlugin(BasePlugin): # Filter stanza with the whitelist. Plugins doing stanza encryption # will have to include these in their encrypted container beforehand. + whitelist = self.tag_whitelist + if self.encrypted_tags is not None: + whitelist += self.encrypted_tags + for elem in message.xml[:]: - if elem.tag not in self.tag_whitelist: + if elem.tag not in whitelist: message.xml.remove(elem) log.debug('Encrypted %s message: %r', self.encryption_name, message) |