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

Hard-code doesServerSupportLogoutDevices = true #310

Merged
merged 6 commits into from
Nov 30, 2022
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
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
Original file line number Diff line number Diff line change
@@ -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..a6c54ab 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<EmittedEvents, ClientEventHa
@@ -6632,6 +6632,15 @@ export class MatrixClient extends TypedEventEmitter<EmittedEvents, ClientEventHa
const response = await this.getVersions();
if (!response) return false;
const unstableFeatures = response["unstable_features"];
+
+ console.log('TCHAP server versions', response);
+ // :TCHAP: disable cross signing, by pretending the server doesn't support it.
+ unstableFeatures["org.matrix.e2e_cross_signing"] = false;
+ if (feature === "org.matrix.e2e_cross_signing") {
Expand All @@ -17,3 +18,15 @@ index e501f7d..fbabfcc 100644
return unstableFeatures && !!unstableFeatures[feature];
}

@@ -6686,7 +6695,10 @@ export class MatrixClient extends TypedEventEmitter<EmittedEvents, ClientEventHa
* @return {Promise<boolean>} true if server supports the `logout_devices` parameter
*/
public doesServerSupportLogoutDevices(): Promise<boolean> {
- 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);
+ // en :TCHAP:
}

/**
2 changes: 1 addition & 1 deletion patches/patches.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
16 changes: 16 additions & 0 deletions src/i18n/strings/tchap_translations.json
Original file line number Diff line number Diff line change
Expand Up @@ -265,5 +265,21 @@
"<requestLink>Import from saved file</requestLink>": {
"en": "<requestLink>Import from saved file</requestLink>",
"fr": "<requestLink>Importer depuis le fichier sauvegardé</requestLink>"
},
"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 <desktopLink>%(brand)s Desktop</desktopLink> for encrypted messages to appear in search results.": {
mcalinghee marked this conversation as resolved.
Show resolved Hide resolved
"fr" : "Actuellement %(brand)s ne supporte pas la recherche dans les messages.",
"en" : "Currently %(brand)s does not support searching into messages."
}
}