# HG changeset patch # User Goffi # Date 1546623999 -3600 # Node ID 3dd265d281e1580fe428ed2a41b897135e375499 # Parent 1fa615faec8bd1d710cd564835e7f31ecb559db8 plugin OTR: fixed a bug which was tagging every message as "encrypted" diff -r 1fa615faec8b -r 3dd265d281e1 sat/plugins/plugin_sec_otr.py --- a/sat/plugins/plugin_sec_otr.py Fri Jan 04 18:46:02 2019 +0100 +++ b/sat/plugins/plugin_sec_otr.py Fri Jan 04 18:46:39 2019 +0100 @@ -694,13 +694,14 @@ raise failure.Failure( exceptions.CancelError("Cancelled by OTR") ) # no message at all (no history, no signal) - client.encryption.markAsEncrypted(data) - trusted = otrctx.isTrusted() + + client.encryption.markAsEncrypted(data) + trusted = otrctx.isTrusted() - if trusted: - client.encryption.markAsTrusted(data) - else: - client.encryption.markAsUntrusted(data) + if trusted: + client.encryption.markAsTrusted(data) + else: + client.encryption.markAsUntrusted(data) return data