Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rebase/element ios 1.11.22 #1138

Merged
merged 32 commits into from
Dec 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
a90bfb5
Merge branch 'master' into develop
pixlwave Nov 14, 2024
91b2c84
Prepare for new sprint
pixlwave Nov 14, 2024
3b57e4e
Fix a bug where UIA for cross signing wasn't needed until after check…
pixlwave Nov 27, 2024
328af0c
Fix display of incoming call for group calls when receiving VOIP noti…
hek4ek Dec 4, 2024
05ffa66
Translated using Weblate (Swedish)
LinAGKar Nov 14, 2024
a3874cd
Translated using Weblate (Slovak)
dodog Nov 19, 2024
b940321
Added translation using Weblate (Georgian)
zarooba01 Nov 25, 2024
b502ff9
Translated using Weblate (Ukrainian)
IhorHordiichuk Nov 26, 2024
f58365c
Translated using Weblate (Swedish)
LinAGKar Nov 14, 2024
439042c
Translated using Weblate (Chinese (Simplified))
perrsig Nov 18, 2024
2af826f
Translated using Weblate (Slovak)
dodog Nov 19, 2024
6b275a9
Translated using Weblate (Georgian)
zarooba01 Nov 25, 2024
cd8d422
Translated using Weblate (Ukrainian)
IhorHordiichuk Nov 26, 2024
3113578
Translated using Weblate (Romanian)
dumy Dec 3, 2024
6f89894
Translated using Weblate (Romanian)
Steinhagen Dec 3, 2024
74ad552
Translated using Weblate (Russian)
drygdryg Dec 5, 2024
65b2c6e
Translated using Weblate (Russian)
drygdryg Dec 6, 2024
af97a75
Translated using Weblate (Russian)
drygdryg Dec 6, 2024
5b28178
Translated using Weblate (Russian)
drygdryg Dec 6, 2024
55a511d
Translated using Weblate (Russian)
drygdryg Dec 6, 2024
baed393
Translated using Weblate (Russian)
drygdryg Dec 6, 2024
bfb11b8
Translated using Weblate (Russian)
drygdryg Dec 6, 2024
d8bcc18
Translated using Weblate (Russian)
drygdryg Dec 9, 2024
c23ebe3
Merge pull request #7880 from RiotTranslateBot/weblate-riot-ios-riot-ios
pixlwave Dec 10, 2024
5c388bb
Merge pull request #7881 from RiotTranslateBot/weblate-riot-ios-riot-…
pixlwave Dec 10, 2024
47248b1
Merge pull request #7882 from RiotTranslateBot/weblate-riot-ios-riot-…
pixlwave Dec 10, 2024
342b701
Update the SDK. (#7883)
pixlwave Dec 10, 2024
d26f577
version++
pixlwave Dec 10, 2024
53e7983
Merge pull request #7884 from element-hq/release/1.11.22/release
pixlwave Dec 10, 2024
61e32d0
finish version++
pixlwave Dec 10, 2024
c12e1f3
Merge branch 'release/1.11.22/master'
pixlwave Dec 10, 2024
22db730
Resolve conflicts on Rebase/Element-v1.11.22 into Tchap
NicolasBuquet Dec 11, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
## Changes in 1.11.22 (2024-12-10)

🐛 Bugfixes

- Fix a crash when restoring from a backup and a bug where you couldn't reset cross-signing. ([#7883](https://github.com/element-hq/element-ios/pull/7883))
- Fix display of incoming call for group calls when receiving VOIP notification. ([#7858](https://github.com/element-hq/element-ios/issues/7858))


## Changes in 1.11.21 (2024-11-14)

No significant changes.
Expand Down
10 changes: 5 additions & 5 deletions Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -39,16 +39,16 @@ PODS:
- LoggerAPI (1.9.200):
- Logging (~> 1.1)
- Logging (1.4.0)
- MatrixSDK (0.27.16):
- MatrixSDK/Core (= 0.27.16)
- MatrixSDK/Core (0.27.16):
- MatrixSDK (0.27.17):
- MatrixSDK/Core (= 0.27.17)
- MatrixSDK/Core (0.27.17):
- AFNetworking (~> 4.0.0)
- GZIP (~> 1.3.0)
- libbase58 (~> 0.1.4)
- MatrixSDKCrypto (= 0.4.3)
- Realm (= 10.27.0)
- SwiftyBeaver (= 1.9.5)
- MatrixSDK/JingleCallStack (0.27.16):
- MatrixSDK/JingleCallStack (0.27.17):
- JitsiMeetSDKLite (= 8.1.2-lite)
- MatrixSDK/Core
- MatrixSDKCrypto (0.4.3)
Expand Down Expand Up @@ -192,7 +192,7 @@ SPEC CHECKSUMS:
libPhoneNumber-iOS: 0a32a9525cf8744fe02c5206eb30d571e38f7d75
LoggerAPI: ad9c4a6f1e32f518fdb43a1347ac14d765ab5e3d
Logging: beeb016c9c80cf77042d62e83495816847ef108b
MatrixSDK: ce8f2cec670c2212144a129cc617d4144c89b97f
MatrixSDK: e3096b0b47f8a0bde6ae3f614f9c49e7e92b03ea
MatrixSDKCrypto: 27bee960e0e8b3a3039f3f3e93dd2ec88299c77e
OLMKit: da115f16582e47626616874e20f7bb92222c7a51
PostHog: f9e5c13ceea86bb5314218c85d16125b797eb332
Expand Down
1 change: 1 addition & 0 deletions Riot/Assets/ka.lproj/InfoPlist.strings
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@

333 changes: 333 additions & 0 deletions Riot/Assets/ka.lproj/Vector.strings

Large diffs are not rendered by default.

14 changes: 14 additions & 0 deletions Riot/Assets/ro.lproj/Vector.strings
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
// String for App Store
"store_short_description" = "// String pe App Store";
"title_favourites" = "Favorite";
"title_people" = "Oameni";
"title_rooms" = "Camere";
"title_groups" = "Comunități";
"warning" = "Greșeală";
// Actions
"view" = "Văzut";
"next" = "Următorul";
"back" = "Înapoi";

// Titles
"title_home" = "Acasă";
433 changes: 403 additions & 30 deletions Riot/Assets/ru.lproj/Vector.strings

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions Riot/Assets/sk.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -171,3 +171,4 @@

/* New voice broadcast from a specific person, not referencing a room. */
"VOICE_BROADCAST_FROM_USER" = "%@ začal/a hlasové vysielanie";
"UNSUPPORTED_CALL" = "Nepodporovaný hovor";
1 change: 1 addition & 0 deletions Riot/Assets/sk.lproj/Vector.strings
Original file line number Diff line number Diff line change
Expand Up @@ -2977,3 +2977,4 @@

// MARK: - WYSIWYG Composer
"wysiwyg_composer_action_minimise_action" = "Zmenšiť editor";
"call_unsupported_matrix_rtc_call" = "Nepodporovaný hovor. Na pripojenie k tomuto hovoru je potrebná nová aplikácia Element X.";
1 change: 1 addition & 0 deletions Riot/Assets/sv.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -121,3 +121,4 @@

/* New voice broadcast from a specific person, not referencing a room. */
"VOICE_BROADCAST_FROM_USER" = "%@ påbörjade en röstsändning";
"UNSUPPORTED_CALL" = "Samtal stöds inte";
1 change: 1 addition & 0 deletions Riot/Assets/sv.lproj/Vector.strings
Original file line number Diff line number Diff line change
Expand Up @@ -2721,3 +2721,4 @@

// MARK: - WYSIWYG Composer
"wysiwyg_composer_action_minimise_action" = "Krymp redigerare";
"call_unsupported_matrix_rtc_call" = "Samtal stöds inte. Nya Element X-appen behövs för att gå med i det här samtalet.";
1 change: 1 addition & 0 deletions Riot/Assets/uk.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -121,3 +121,4 @@

/* New voice broadcast from a specific person, not referencing a room. */
"VOICE_BROADCAST_FROM_USER" = "%@ розпочинає голосову трансляцію";
"UNSUPPORTED_CALL" = "Непідтримуваний виклик";
1 change: 1 addition & 0 deletions Riot/Assets/uk.lproj/Vector.strings
Original file line number Diff line number Diff line change
Expand Up @@ -2979,3 +2979,4 @@

// MARK: - WYSIWYG Composer
"wysiwyg_composer_action_minimise_action" = "Зменшити редактор";
"call_unsupported_matrix_rtc_call" = "Непідтримуваний виклик. Потрібен застосунок Element X, щоб приєднатися до цього виклику.";
4 changes: 3 additions & 1 deletion Riot/Assets/zh_Hans.lproj/Vector.strings
Original file line number Diff line number Diff line change
Expand Up @@ -2227,7 +2227,7 @@
"authentication_qr_login_start_subtitle" = "用此设备的相机扫描显示在你的其他设备上的QR码:";
"authentication_qr_login_start_title" = "扫描QR码";
"authentication_choose_password_signout_all_devices" = "登出全部设备";
"authentication_login_with_qr" = "用QR码登录";
"authentication_login_with_qr" = "使用二维码登录";
"onboarding_congratulations_home_button" = "带我到主页";
"onboarding_use_case_message" = "我们将帮助你连接";
"invite_to" = "邀请到%@";
Expand Down Expand Up @@ -2426,3 +2426,5 @@
"network_offline_message" = "您已离线,请检查您的网络链接。";
"key_verification_alert_body" = "重新检查以确保您的账户安全。";
"key_verification_scan_qr_code_title" = "扫描 QR Code";
"room_action_report" = "举报房间";
"pill_message_from" = "来自 %@ 的消息";
7 changes: 5 additions & 2 deletions Riot/Managers/Call/CallPresenter.swift
Original file line number Diff line number Diff line change
Expand Up @@ -309,8 +309,11 @@ class CallPresenter: NSObject {
return
}
let user = session.user(withUserId: event.sender)
let displayName = NSString.localizedUserNotificationString(forKey: "GROUP_CALL_FROM_USER",
arguments: [user?.displayname as Any])
let displayNameUNLocalizedString = NSString.localizedUserNotificationString(forKey: "GROUP_CALL_FROM_USER",
arguments: [user?.displayname as Any])

// will fix app crash when CXCallUpdate accesses the localizedCallerName property because list of allowed classes for com.apple.callkit.callsourcehost service contains only NSString
let displayName = NSString(string: displayNameUNLocalizedString) as String

MXLog.debug("[CallPresenter] processWidgetEvent: Report new incoming call with id: \(newUUID.uuidString)")

Expand Down
74 changes: 20 additions & 54 deletions Riot/Modules/CrossSigning/Setup/CrossSigningSetupCoordinator.swift
Original file line number Diff line number Diff line change
Expand Up @@ -45,82 +45,48 @@ final class CrossSigningSetupCoordinator: CrossSigningSetupCoordinatorType {
// MARK: - Public methods

func start() {
// Tchap: launch classic crossiging without authentication parameters
// to trigger real requets to backend, with real keys.
// This will trigger a 401 reponse that will launch the SSO reauthentication.
// self.showReauthentication()
self.setupCrossSigning(with: [:])
setupCrossSigning()
}

func toPresentable() -> UIViewController {
return self.parameters.presenter.toPresentable()
}

// MARK: - Private methods

private func showReauthentication() {

let setupCrossSigningRequest = self.crossSigningService.setupCrossSigningRequest()

let reauthenticationParameters = ReauthenticationCoordinatorParameters(session: parameters.session,
presenter: parameters.presenter,
title: parameters.title,
message: parameters.message,
authenticatedEndpointRequest: setupCrossSigningRequest)

let coordinator = ReauthenticationCoordinator(parameters: reauthenticationParameters)
coordinator.delegate = self
self.add(childCoordinator: coordinator)

coordinator.start()
}

// Tchap: reauthenticate with session information (used by SSO reauthentication)
private func showReauthentication(with session: MXAuthenticationSession) {
private func setupCrossSigning(with authenticationParameters: [String: Any] = [:]) {
guard let crossSigning = parameters.session.crypto?.crossSigning else { return }

crossSigning.setup(withAuthParams: authenticationParameters) { [weak self] in
guard let self else { return }
delegate?.crossSigningSetupCoordinatorDidComplete(self)
} failure: { [weak self] error in
guard let self else { return }

if let responseData = (error as NSError).userInfo[MXHTTPClientErrorResponseDataKey] as? [AnyHashable: Any],
let authenticationSession = MXAuthenticationSession(fromJSON: responseData) {
showReauthentication(authenticationSession: authenticationSession)
} else {
delegate?.crossSigningSetupCoordinator(self, didFailWithError: error)
}
}
}

private func showReauthentication(authenticationSession: MXAuthenticationSession) {
let setupCrossSigningRequest = self.crossSigningService.setupCrossSigningRequest()

let reauthenticationParameters = ReauthenticationCoordinatorParameters(session: parameters.session,
presenter: parameters.presenter,
title: parameters.title,
message: parameters.message,
authenticationSession: session)
authenticationSession: authenticationSession)

let coordinator = ReauthenticationCoordinator(parameters: reauthenticationParameters)
coordinator.delegate = self
self.add(childCoordinator: coordinator)

coordinator.start()
}

private func setupCrossSigning(with authenticationParameters: [String: Any]) {
guard let crossSigning = self.parameters.session.crypto?.crossSigning else {
return
}

crossSigning.setup(withAuthParams: authenticationParameters) { [weak self] in
guard let self = self else {
return
}
self.delegate?.crossSigningSetupCoordinatorDidComplete(self)
} failure: { [weak self] error in
guard let self = self else {
return
}

// Tchap: handle 'authentication requested' error (401) from backend
// self.delegate?.crossSigningSetupCoordinator(self, didFailWithError: error)
let nsError = error as NSError
if let jsonResponse = nsError.userInfo[MXHTTPClientErrorResponseDataKey] as? [AnyHashable: Any],
let authenticationSession = MXAuthenticationSession(fromJSON: jsonResponse) {
self.showReauthentication(with: authenticationSession)
}
else {
self.delegate?.crossSigningSetupCoordinator(self, didFailWithError: error)
}

}
}
}

// MARK: - ReauthenticationCoordinatorDelegate
Expand Down
Loading