From 0cecff2ebcc23494443f48b45836ff3eede554e5 Mon Sep 17 00:00:00 2001 From: Mauro Romito Date: Fri, 8 Nov 2024 16:52:39 +0100 Subject: [PATCH 1/2] fix for join rule override in knocking rooms. --- ElementX/Sources/Services/Client/ClientProxy.swift | 1 + 1 file changed, 1 insertion(+) diff --git a/ElementX/Sources/Services/Client/ClientProxy.swift b/ElementX/Sources/Services/Client/ClientProxy.swift index 8516ab0211..edf8200206 100644 --- a/ElementX/Sources/Services/Client/ClientProxy.swift +++ b/ElementX/Sources/Services/Client/ClientProxy.swift @@ -410,6 +410,7 @@ class ClientProxy: ClientProxyProtocol { invite: userIDs, avatar: avatarURL?.absoluteString, powerLevelContentOverride: isKnockingOnly ? Self.knockingRoomCreationPowerLevelOverrides : Self.roomCreationPowerLevelOverrides, + joinRuleOverride: isKnockingOnly ? .knock : nil, // This is an FFI naming mistake, what is required is the `aliasLocalPart` not the whole alias canonicalAlias: aliasLocalPart) let roomID = try await client.createRoom(request: parameters) From e17bc87aa9940403e487c2ae9ebcc59653807748 Mon Sep 17 00:00:00 2001 From: Mauro Romito Date: Fri, 8 Nov 2024 17:22:10 +0100 Subject: [PATCH 2/2] improved some copies --- .../Localizations/en.lproj/Localizable.strings | 8 ++++++-- ElementX/Sources/Generated/Strings.swift | 12 ++++++++++-- 2 files changed, 16 insertions(+), 4 deletions(-) diff --git a/ElementX/Resources/Localizations/en.lproj/Localizable.strings b/ElementX/Resources/Localizations/en.lproj/Localizable.strings index 23b47f1e3c..3b8b01bc05 100644 --- a/ElementX/Resources/Localizations/en.lproj/Localizable.strings +++ b/ElementX/Resources/Localizations/en.lproj/Localizable.strings @@ -849,6 +849,10 @@ "screen_session_verification_request_title" = "Verification requested"; "screen_session_verification_they_dont_match" = "They don’t match"; "screen_session_verification_they_match" = "They match"; +"screen_session_verification_use_another_device_subtitle" = "Make sure you have the app open in the other device before starting verification from here."; +"screen_session_verification_use_another_device_title" = "Open the app on another verified device"; +"screen_session_verification_waiting_another_device_subtitle" = "You should see a popup on the other device. Start the verification from there now."; +"screen_session_verification_waiting_another_device_title" = "Start verification on the other device"; "screen_session_verification_waiting_to_accept_subtitle" = "Accept the request to start the verification process in your other session to continue."; "screen_session_verification_waiting_to_accept_title" = "Waiting to accept request"; "screen_share_location_title" = "Share location"; @@ -913,8 +917,8 @@ "state_event_room_invite_you" = "%1$@ invited you"; "state_event_room_join" = "%1$@ joined the room"; "state_event_room_join_by_you" = "You joined the room"; -"state_event_room_knock" = "%1$@ requested to join"; -"state_event_room_knock_accepted" = "%1$@ allowed %2$@ to join"; +"state_event_room_knock" = "%1$@ is requesting to join"; +"state_event_room_knock_accepted" = "%1$@ granted access to %2$@"; "state_event_room_knock_accepted_by_you" = "You allowed %1$@ to join"; "state_event_room_knock_by_you" = "You requested to join"; "state_event_room_knock_denied" = "%1$@ rejected %2$@'s request to join"; diff --git a/ElementX/Sources/Generated/Strings.swift b/ElementX/Sources/Generated/Strings.swift index f807da0708..fa25268816 100644 --- a/ElementX/Sources/Generated/Strings.swift +++ b/ElementX/Sources/Generated/Strings.swift @@ -2082,6 +2082,14 @@ internal enum L10n { internal static var screenSessionVerificationTheyDontMatch: String { return L10n.tr("Localizable", "screen_session_verification_they_dont_match") } /// They match internal static var screenSessionVerificationTheyMatch: String { return L10n.tr("Localizable", "screen_session_verification_they_match") } + /// Make sure you have the app open in the other device before starting verification from here. + internal static var screenSessionVerificationUseAnotherDeviceSubtitle: String { return L10n.tr("Localizable", "screen_session_verification_use_another_device_subtitle") } + /// Open the app on another verified device + internal static var screenSessionVerificationUseAnotherDeviceTitle: String { return L10n.tr("Localizable", "screen_session_verification_use_another_device_title") } + /// You should see a popup on the other device. Start the verification from there now. + internal static var screenSessionVerificationWaitingAnotherDeviceSubtitle: String { return L10n.tr("Localizable", "screen_session_verification_waiting_another_device_subtitle") } + /// Start verification on the other device + internal static var screenSessionVerificationWaitingAnotherDeviceTitle: String { return L10n.tr("Localizable", "screen_session_verification_waiting_another_device_title") } /// Accept the request to start the verification process in your other session to continue. internal static var screenSessionVerificationWaitingToAcceptSubtitle: String { return L10n.tr("Localizable", "screen_session_verification_waiting_to_accept_subtitle") } /// Waiting to accept request @@ -2278,11 +2286,11 @@ internal enum L10n { } /// You joined the room internal static var stateEventRoomJoinByYou: String { return L10n.tr("Localizable", "state_event_room_join_by_you") } - /// %1$@ requested to join + /// %1$@ is requesting to join internal static func stateEventRoomKnock(_ p1: Any) -> String { return L10n.tr("Localizable", "state_event_room_knock", String(describing: p1)) } - /// %1$@ allowed %2$@ to join + /// %1$@ granted access to %2$@ internal static func stateEventRoomKnockAccepted(_ p1: Any, _ p2: Any) -> String { return L10n.tr("Localizable", "state_event_room_knock_accepted", String(describing: p1), String(describing: p2)) }