mirror of
https://gitlab.opencode.de/bwi/bundesmessenger/clients/bundesmessenger-ios.git
synced 2026-04-30 21:26:57 +02:00
No event decoration if no decryption result
This commit is contained in:
@@ -204,14 +204,21 @@
|
||||
|
||||
// The encryption is in a good state.
|
||||
// Only show a warning badge if there are decryption trust issues.
|
||||
switch (event.decryptionDecoration.color)
|
||||
if (event.decryptionDecoration)
|
||||
{
|
||||
case MXEventDecryptionDecorationColorRed:
|
||||
return EventEncryptionDecorationRed;
|
||||
case MXEventDecryptionDecorationColorGrey:
|
||||
return EventEncryptionDecorationGrey;
|
||||
case MXEventDecryptionDecorationColorNone:
|
||||
return EventEncryptionDecorationNone;
|
||||
switch (event.decryptionDecoration.color)
|
||||
{
|
||||
case MXEventDecryptionDecorationColorNone:
|
||||
return EventEncryptionDecorationNone;
|
||||
case MXEventDecryptionDecorationColorGrey:
|
||||
return EventEncryptionDecorationGrey;
|
||||
case MXEventDecryptionDecorationColorRed:
|
||||
return EventEncryptionDecorationRed;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
return EventEncryptionDecorationNone;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user