diff --git a/sat/plugins/plugin_sec_otr.py b/sat/plugins/plugin_sec_otr.py index ad0457c0..41103863 100644 --- a/sat/plugins/plugin_sec_otr.py +++ b/sat/plugins/plugin_sec_otr.py @@ -694,13 +694,14 @@ class OTR(object): raise failure.Failure( exceptions.CancelError("Cancelled by OTR") ) # no message at all (no history, no signal) - client.encryption.markAsEncrypted(data) - trusted = otrctx.isTrusted() - if trusted: - client.encryption.markAsTrusted(data) - else: - client.encryption.markAsUntrusted(data) + client.encryption.markAsEncrypted(data) + trusted = otrctx.isTrusted() + + if trusted: + client.encryption.markAsTrusted(data) + else: + client.encryption.markAsUntrusted(data) return data