From 60cb8db7ee2cdc8a58684438e84935a323bbed49 Mon Sep 17 00:00:00 2001 From: Estelle Comment Date: Fri, 18 Nov 2022 13:49:38 +0100 Subject: [PATCH 1/3] Hard-code doesServerSupportLogoutDevices = true --- .../matrix-js-sdk+21.0.0.patch | 16 ++++++++++++++-- patches/patches.json | 2 +- 2 files changed, 15 insertions(+), 3 deletions(-) rename patches/{disable-cross-signing => disable-cross-signing-and-enable-logout-devices-when-changing-password}/matrix-js-sdk+21.0.0.patch (57%) diff --git a/patches/disable-cross-signing/matrix-js-sdk+21.0.0.patch b/patches/disable-cross-signing-and-enable-logout-devices-when-changing-password/matrix-js-sdk+21.0.0.patch similarity index 57% rename from patches/disable-cross-signing/matrix-js-sdk+21.0.0.patch rename to patches/disable-cross-signing-and-enable-logout-devices-when-changing-password/matrix-js-sdk+21.0.0.patch index 695995c949..60146b79d4 100644 --- a/patches/disable-cross-signing/matrix-js-sdk+21.0.0.patch +++ b/patches/disable-cross-signing-and-enable-logout-devices-when-changing-password/matrix-js-sdk+21.0.0.patch @@ -1,12 +1,13 @@ diff --git a/node_modules/matrix-js-sdk/src/client.ts b/node_modules/matrix-js-sdk/src/client.ts -index e501f7d..fbabfcc 100644 +index e501f7d..59e44f0 100644 --- a/node_modules/matrix-js-sdk/src/client.ts +++ b/node_modules/matrix-js-sdk/src/client.ts -@@ -6632,6 +6632,14 @@ export class MatrixClient extends TypedEventEmitter} true if server supports the `logout_devices` parameter + */ + public doesServerSupportLogoutDevices(): Promise { ++ // :TCHAP: hard-code to true, our custom backend supports it. + return this.isVersionSupported("r0.6.1"); ++ //return Promise.resolve(true); ++ // en :TCHAP: + } + + /** diff --git a/patches/patches.json b/patches/patches.json index edf11c621d..ef794a35ab 100644 --- a/patches/patches.json +++ b/patches/patches.json @@ -46,7 +46,7 @@ "src/components/views/settings/tabs/room/SecurityRoomSettingsTab.tsx" ] }, - "disable-cross-signing": { + "disable-cross-signing-and-enable-logout-devices-when-changing-password": { "package": "matrix-js-sdk", "files": [ "src/client.ts" From c7285c2f58702a2c19fe2d56606da88056bbfbcb Mon Sep 17 00:00:00 2001 From: Estelle Comment Date: Fri, 18 Nov 2022 14:24:04 +0100 Subject: [PATCH 2/3] With the actual fix --- .../matrix-js-sdk+21.0.0.patch | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/patches/disable-cross-signing-and-enable-logout-devices-when-changing-password/matrix-js-sdk+21.0.0.patch b/patches/disable-cross-signing-and-enable-logout-devices-when-changing-password/matrix-js-sdk+21.0.0.patch index 60146b79d4..b13a1abbed 100644 --- a/patches/disable-cross-signing-and-enable-logout-devices-when-changing-password/matrix-js-sdk+21.0.0.patch +++ b/patches/disable-cross-signing-and-enable-logout-devices-when-changing-password/matrix-js-sdk+21.0.0.patch @@ -1,5 +1,5 @@ diff --git a/node_modules/matrix-js-sdk/src/client.ts b/node_modules/matrix-js-sdk/src/client.ts -index e501f7d..59e44f0 100644 +index e501f7d..a6c54ab 100644 --- a/node_modules/matrix-js-sdk/src/client.ts +++ b/node_modules/matrix-js-sdk/src/client.ts @@ -6632,6 +6632,15 @@ export class MatrixClient extends TypedEventEmitter} true if server supports the `logout_devices` parameter */ public doesServerSupportLogoutDevices(): Promise { +- return this.isVersionSupported("r0.6.1"); + // :TCHAP: hard-code to true, our custom backend supports it. - return this.isVersionSupported("r0.6.1"); -+ //return Promise.resolve(true); ++ // return this.isVersionSupported("r0.6.1"); ++ return Promise.resolve(true); + // en :TCHAP: } From c577e4bb9fa24a2f2edff500a0c0c057736f5ad6 Mon Sep 17 00:00:00 2001 From: olivier Date: Wed, 30 Nov 2022 16:03:12 +0100 Subject: [PATCH 3/3] modify resetPassword logoutDevices --- src/i18n/strings/tchap_translations.json | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/src/i18n/strings/tchap_translations.json b/src/i18n/strings/tchap_translations.json index 7153d5a621..15764b77f7 100644 --- a/src/i18n/strings/tchap_translations.json +++ b/src/i18n/strings/tchap_translations.json @@ -265,5 +265,21 @@ "Import from saved file": { "en": "Import from saved file", "fr": "Importer depuis le fichier sauvegardé" + }, + "Sign out all devices": { + "en": "Lock my messages on all my devices", + "fr": "Verrouiller mes messages sur tous mes appareils" + }, + "If you want to retain access to your chat history in encrypted rooms, set up Key Backup or export your message keys from one of your other devices before proceeding.": { + "en": "If you want to keep your messages, save your Tchap keys from one of your devices before proceeding. They will help to restore your messages", + "fr": "Si vous voulez garder un accès à vos messages, sauvegardez vos clés Tchap à partir de l’un de vos appareils avant de continuer. Elles vous permettront de dévérouiller vos messages" + }, + "Signing out your devices will delete the message encryption keys stored on them, making encrypted chat history unreadable.": { + "fr": "Nous allons vous déconnecter de vos appareils afin de verrouiller les messages qu'ils contiennent.", + "en": "We will log you out from your devices to lock the messages stored on them" + }, + "%(brand)s can't securely cache encrypted messages locally while running in a web browser. Use %(brand)s Desktop for encrypted messages to appear in search results.": { + "fr" : "Actuellement %(brand)s ne supporte pas la recherche dans les messages.", + "en" : "Currently %(brand)s does not support searching into messages." } }