From 79ae57ba3239e10ca562e57e724f58f3518ff703 Mon Sep 17 00:00:00 2001 From: Nicolas Buquet <> Date: Tue, 31 Jan 2023 18:10:52 +0100 Subject: [PATCH 1/3] Adopt KeyVerification path from Element if cross-signing is activated --- .../Common/KeyVerificationCoordinator.swift | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/Riot/Modules/KeyVerification/Common/KeyVerificationCoordinator.swift b/Riot/Modules/KeyVerification/Common/KeyVerificationCoordinator.swift index 73b523490..276f866c6 100644 --- a/Riot/Modules/KeyVerification/Common/KeyVerificationCoordinator.swift +++ b/Riot/Modules/KeyVerification/Common/KeyVerificationCoordinator.swift @@ -127,12 +127,17 @@ final class KeyVerificationCoordinator: KeyVerificationCoordinatorType { case .verifyUser(let roomMember): rootCoordinator = self.createUserVerificationStartCoordinator(with: roomMember) case .verifyDevice(let userId, let deviceId): - // Tchap: self verification is not supported yet -// if userId == self.session.myUser.userId { -// rootCoordinator = self.createSelfVerificationCoordinator(otherDeviceId: deviceId) -// } else { + // Tchap: activate self verification only if cross-signing is activated +#if CROSS_SIGNING + if userId == self.session.myUser.userId { + rootCoordinator = self.createSelfVerificationCoordinator(otherDeviceId: deviceId) + } else { rootCoordinator = self.createDataLoadingScreenCoordinator(otherUserId: userId, otherDeviceId: deviceId) -// } + } +#else + rootCoordinator = self.createDataLoadingScreenCoordinator(otherUserId: userId, otherDeviceId: deviceId) +#endif + case .incomingRequest(let incomingKeyVerificationRequest): rootCoordinator = self.createDataLoadingScreenCoordinator(with: incomingKeyVerificationRequest) case .incomingSASTransaction(let incomingSASTransaction): From 95b9113018858d54b51cca36b4fbd4319d0bd4ea Mon Sep 17 00:00:00 2001 From: Nicolas Buquet <> Date: Wed, 1 Feb 2023 11:00:20 +0100 Subject: [PATCH 2/3] Add changelog file --- changelog.d/698.change | 1 + 1 file changed, 1 insertion(+) create mode 100644 changelog.d/698.change diff --git a/changelog.d/698.change b/changelog.d/698.change new file mode 100644 index 000000000..87d287137 --- /dev/null +++ b/changelog.d/698.change @@ -0,0 +1 @@ +Adopt KeyVerification path from Element if cross-signing is activated From e387b2fec28d2ad7e6a5dbc1ff701c7c7559938a Mon Sep 17 00:00:00 2001 From: Nicolas Buquet <> Date: Wed, 1 Feb 2023 14:13:58 +0100 Subject: [PATCH 3/3] Update changelog description --- changelog.d/698.change | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/changelog.d/698.change b/changelog.d/698.change index 87d287137..6be4058c1 100644 --- a/changelog.d/698.change +++ b/changelog.d/698.change @@ -1 +1 @@ -Adopt KeyVerification path from Element if cross-signing is activated +Adopt SelfVerification path from Element if cross-signing is activated