poezio/plugin_e2ee: Use encrypted_tags attribute to complete whitelist filtering on encryption

Signed-off-by: Maxime Buquet's avatarMaxime “pep” Buquet <pep@bouah.net>
parent a166fcb5
......@@ -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:
log.debug('Encrypted %s message: %r', self.encryption_name, message)
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment