# HG changeset patch # User Goffi # Date 1665859020 -7200 # Node ID 80d29f55ba8b514e12ae578be4dc4b0423c1dabd # Parent e345d93fb6e5daa11aadc79cb99ae782301f1c38 plugin XEP-0374: exluce `openpgp` element from XEP-0373 on send trigger: the `openpgp` element is excluded to avoid useless double encryption. rel 380 diff -r e345d93fb6e5 -r 80d29f55ba8b sat/plugins/plugin_xep_0374.py --- a/sat/plugins/plugin_xep_0374.py Sat Oct 15 20:36:53 2022 +0200 +++ b/sat/plugins/plugin_xep_0374.py Sat Oct 15 20:37:00 2022 +0200 @@ -382,6 +382,9 @@ # TODO: There should probably be explicitly forbidden elements here too, just as # for XEP-0420 for child in list(stanza.elements()): + if child.name == "openpgp" and child.uri == NS_OX: + log.debug("not re-encrypting encrypted OX element") + continue # Remove the child from the stanza stanza.children.remove(child)