Skip to content

Commit

Permalink
Add an entry for event untrusted status into the encryption info view
Browse files Browse the repository at this point in the history
  • Loading branch information
ismailgulek committed Aug 11, 2022
1 parent ec306bf commit 067bd92
Showing 1 changed file with 11 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,7 @@ - (void)updateTextViewText
NSString *claimedKey = _mxEvent.keysClaimed[@"ed25519"];
NSString *algorithm = _mxEvent.wireContent[@"algorithm"];
NSString *sessionId = _mxEvent.wireContent[@"session_id"];
NSString *untrusted = _mxEvent.isUntrusted ? [VectorL10n userVerificationSessionsListSessionUntrusted] : [VectorL10n userVerificationSessionsListSessionTrusted];

NSString *decryptionError;
if (_mxEvent.decryptionError)
Expand Down Expand Up @@ -277,6 +278,16 @@ - (void)updateTextViewText
attributes:@{NSForegroundColorAttributeName: _defaultTextColor,
NSFontAttributeName: [UIFont systemFontOfSize:14]}]];
[eventInformationString appendAttributedString:[MXKEncryptionInfoView verticalWhitespace]];

[eventInformationString appendAttributedString:[[NSMutableAttributedString alloc]
initWithString:[NSString stringWithFormat:@"%@\n", [VectorL10n sslTrust]]
attributes:@{NSForegroundColorAttributeName: _defaultTextColor,
NSFontAttributeName: [UIFont boldSystemFontOfSize:14]}]];
[eventInformationString appendAttributedString:[[NSMutableAttributedString alloc]
initWithString:untrusted
attributes:@{NSForegroundColorAttributeName: _defaultTextColor,
NSFontAttributeName: [UIFont systemFontOfSize:14]}]];
[eventInformationString appendAttributedString:[MXKEncryptionInfoView verticalWhitespace]];

[textViewAttributedString appendAttributedString:eventInformationString];
}
Expand Down

0 comments on commit 067bd92

Please sign in to comment.