Mercurial > libervia-backend
diff sat/plugins/plugin_xep_0384.py @ 3231:e756e0eb1be4
core (memory/encryption): automatic start encryption if peer send encrypted message:
If peer sends encrypted message and we have no encryption activated, we automatically
start encryption to avoid sending plain text message when answering.
markAsEncrypted now needs the encryption algorithm namespace as mandatory argument.
author | Goffi <goffi@goffi.org> |
---|---|
date | Mon, 23 Mar 2020 17:52:18 +0100 |
parents | 806a7936a591 |
children | 9477f3197981 |
line wrap: on
line diff
--- a/sat/plugins/plugin_xep_0384.py Mon Mar 23 16:55:15 2020 +0100 +++ b/sat/plugins/plugin_xep_0384.py Mon Mar 23 17:52:18 2020 +0100 @@ -1162,7 +1162,7 @@ message_elt.children.remove(encrypted_elt) if plaintext: message_elt.addElement("body", content=plaintext) - post_treat.addCallback(client.encryption.markAsEncrypted) + post_treat.addCallback(client.encryption.markAsEncrypted, namespace=NS_OMEMO) defer.returnValue(True) def getJIDsForRoom(self, client, room_jid):