| author | Stephen Paul Weber
<singpolyma@singpolyma.net> 2026-07-13 17:05:55 UTC |
| committer | Stephen Paul Weber
<singpolyma@singpolyma.net> 2026-07-13 17:05:55 UTC |
| parent | 61fa462c874bc52df833d01447b2fa1316893371 |
| borogove/OMEMO.hx | +9 | -1 |
diff --git a/borogove/OMEMO.hx b/borogove/OMEMO.hx index ab2e7e4..b8be3fd 100644 --- a/borogove/OMEMO.hx +++ b/borogove/OMEMO.hx @@ -1108,7 +1108,15 @@ class OMEMO { final promStanza = promHeader.then((header) -> { final newStanza = stanza.clone(); - newStanza.removeChildren("body"); + // Remove most unencrypted leaks from legacy OMEMO + for (c in newStanza.allTags()) { + if ( + !["thread"].contains(c.name) && + !["urn:xmpp:message-correct:0", "http://jabber.org/protocol/address", "urn:xmpp:receipts"].contains(c.attr.get("xmlns")) + ) { + newStanza.removeChild(c); + } + } newStanza.addChild(header); newStanza.textTag("encryption", "", { xmlns: "urn:xmpp:eme:0", namespace: "eu.siacs.conversations.axolotl" }); newStanza.textTag("body", "I sent you an OMEMO encrypted message but your client doesn’t seem to support that. Find more information on https://conversations.im/omemo");