Mercurial > libervia-backend
diff sat/plugins/plugin_sec_otr.py @ 2753:3dd265d281e1
plugin OTR: fixed a bug which was tagging every message as "encrypted"
author | Goffi <goffi@goffi.org> |
---|---|
date | Fri, 04 Jan 2019 18:46:39 +0100 |
parents | da59ff099b32 |
children | 003b8b4b56a7 |
line wrap: on
line diff
--- 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