Skip to content

Commit

Permalink
Merge pull request #7138 from vector-im/alfogrillo/unverified_session…
Browse files Browse the repository at this point in the history
…s_refinements

Update unverifiable sessions copies (PSG-1002)
  • Loading branch information
Alfonso Grillo authored Dec 6, 2022
2 parents d1c3ee1 + 3a45ba4 commit 1efa7c1
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 5 deletions.
3 changes: 2 additions & 1 deletion Riot/Assets/en.lproj/Vector.strings
Original file line number Diff line number Diff line change
Expand Up @@ -2459,7 +2459,7 @@ To enable access, tap Settings> Location and select Always";
"user_session_unverified_additional_info" = "Verify your current session for enhanced secure messaging.";
"user_session_verification_unknown_additional_info" = "Verify your current session to reveal this session's verification status.";
"user_other_session_unverified_additional_info" = "Verify or sign out from this session for best security and reliability.";
"user_other_session_permanently_unverified_additional_info" = "This session cannot be verified because it does not support encryption.";
"user_other_session_permanently_unverified_additional_info" = "This session doesn’t support encryption and thus can't be verified.";
"user_other_session_verified_additional_info" = "This session is ready for secure messaging.";
"user_session_push_notifications" = "Push notifications";
"user_session_push_notifications_message" = "When turned on, this session will receive push notifications.";
Expand All @@ -2468,6 +2468,7 @@ To enable access, tap Settings> Location and select Always";
"user_session_verified_session_description" = "Verified sessions are anywhere you are using Element after entering your passphrase or confirming your identity with another verified session.\n\nThis means that you have all the keys needed to unlock your encrypted messages and confirm to other users that you trust this session.";
"user_session_unverified_session_title" = "Unverified session";
"user_session_unverified_session_description" = "Unverified sessions are sessions that have logged in with your credentials but not been cross-verified.\n\nYou should make especially certain that you recognise these sessions as they could represent an unauthorised use of your account.";
"user_session_permanently_unverified_session_description" = "This session doesn't support encryption, so it can't be verified.\n\nYou won't be able to participate in rooms where encryption is enabled when using this session.\n\nFor best security and privacy, it is recommended to use Matrix clients that support encryption.";
"user_session_inactive_session_title" = "Inactive sessions";
"user_session_inactive_session_description" = "Inactive sessions are sessions you have not used in some time, but they continue to receive encryption keys.\n\nRemoving inactive sessions improves security and performance, and makes it easier for you to identify if a new session is suspicious.";
"user_session_rename_session_title" = "Renaming sessions";
Expand Down
6 changes: 5 additions & 1 deletion Riot/Generated/Strings.swift
Original file line number Diff line number Diff line change
Expand Up @@ -8723,7 +8723,7 @@ public class VectorL10n: NSObject {
public static var userOtherSessionNoVerifiedSessions: String {
return VectorL10n.tr("Vector", "user_other_session_no_verified_sessions")
}
/// This session cannot be verified because it does not support encryption.
/// This session doesn’t support encryption and thus can't be verified.
public static var userOtherSessionPermanentlyUnverifiedAdditionalInfo: String {
return VectorL10n.tr("Vector", "user_other_session_permanently_unverified_additional_info")
}
Expand Down Expand Up @@ -8855,6 +8855,10 @@ public class VectorL10n: NSObject {
public static var userSessionOverviewSessionTitle: String {
return VectorL10n.tr("Vector", "user_session_overview_session_title")
}
/// This session doesn't support encryption, so it can't be verified.\n\nYou won't be able to participate in rooms where encryption is enabled when using this session.\n\nFor best security and privacy, it is recommended to use Matrix clients that support encryption.
public static var userSessionPermanentlyUnverifiedSessionDescription: String {
return VectorL10n.tr("Vector", "user_session_permanently_unverified_session_description")
}
/// Push notifications
public static var userSessionPushNotifications: String {
return VectorL10n.tr("Vector", "user_session_push_notifications")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ struct UserSessionCardViewData {
case .unverified:
return isCurrentSessionDisplayMode ? VectorL10n.userSessionUnverifiedAdditionalInfo : VectorL10n.userOtherSessionUnverifiedAdditionalInfo + " %@"
case .permanentlyUnverified:
return VectorL10n.userOtherSessionPermanentlyUnverifiedAdditionalInfo
return isCurrentSessionDisplayMode ? VectorL10n.userOtherSessionPermanentlyUnverifiedAdditionalInfo : VectorL10n.userOtherSessionPermanentlyUnverifiedAdditionalInfo + " %@"
case .unknown:
return VectorL10n.userSessionVerificationUnknownAdditionalInfo
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -476,8 +476,10 @@ private extension UserSessionInfo {

var bottomSheetDescription: String {
switch verificationState {
case .unverified, .permanentlyUnverified:
case .unverified:
return VectorL10n.userSessionUnverifiedSessionDescription
case .permanentlyUnverified:
return VectorL10n.userSessionPermanentlyUnverifiedSessionDescription
case .verified:
return VectorL10n.userSessionVerifiedSessionDescription
case .unknown:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ class UserSessionOverviewUITests: MockScreenTestCase {

func test_whenPermanentlySessionSelected_copyIsCorrect() {
app.goToScreenWithIdentifier(MockUserSessionOverviewScreenState.otherSession(sessionState: .permanentlyUnverified).title)
XCTAssertTrue(app.buttons[VectorL10n.userOtherSessionPermanentlyUnverifiedAdditionalInfo].exists)
let buttonId = "\(VectorL10n.userOtherSessionPermanentlyUnverifiedAdditionalInfo) \(VectorL10n.userSessionLearnMore)"
XCTAssertTrue(app.buttons[buttonId].exists)
}
}
1 change: 1 addition & 0 deletions changelog.d/pr-7138.change
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Update unverifiable sessions copies in the Device Manager.

0 comments on commit 1efa7c1

Please sign in to comment.