diff sat/plugins/plugin_sec_otr.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 2f406b762788
children be6d91572633
line wrap: on
line diff
--- a/sat/plugins/plugin_sec_otr.py	Mon Mar 23 16:55:15 2020 +0100
+++ b/sat/plugins/plugin_sec_otr.py	Mon Mar 23 17:52:18 2020 +0100
@@ -698,7 +698,7 @@
                     exceptions.CancelError("Cancelled by OTR")
                 )  # no message at all (no history, no signal)
 
-            client.encryption.markAsEncrypted(data)
+            client.encryption.markAsEncrypted(data, namespace=NS_OTR)
             trusted = otrctx.isTrusted()
 
             if trusted: