plugin OTR: fixed a bug which was tagging every message as "encrypted"

This commit is contained in:
Goffi 2019-01-04 18:46:39 +01:00
commit 554248e108

View file

@ -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