No event decoration if no decryption result

This commit is contained in:
Andy Uhnak
2023-04-03 17:30:05 +01:00
parent 00764ed197
commit 28f26de5f6
3 changed files with 17 additions and 8 deletions
@@ -196,7 +196,8 @@ static NSAttributedString *verticalWhitespace = nil;
if (!safetyMessage)
{
// Use default copy if none is provided by the decryption decoration
safetyMessage = _mxEvent.decryptionDecoration.color != MXEventDecryptionDecorationColorNone ? [VectorL10n roomEventEncryptionInfoKeyAuthenticityNotGuaranteed] : [VectorL10n userVerificationSessionsListSessionTrusted];
BOOL isUntrusted = _mxEvent.decryptionDecoration && _mxEvent.decryptionDecoration.color != MXEventDecryptionDecorationColorNone;
safetyMessage = isUntrusted ? [VectorL10n roomEventEncryptionInfoKeyAuthenticityNotGuaranteed] : [VectorL10n userVerificationSessionsListSessionTrusted];
}
NSString *decryptionError;