From 97dc959e960027c9f676a10bf57143f9ab0cf760 Mon Sep 17 00:00:00 2001 From: Florian Duros Date: Wed, 29 Jan 2025 17:55:24 +0100 Subject: [PATCH 1/2] refactor(MatrixChat): remove `MatrixClient.setGlobalErrorOnUnknownDevices` call MatrixClient.setGlobalErrorOnUnknownDevices is not implemented in the rust-crypto and will be removed when the legacy crypto will be ripped out. --- src/components/structures/MatrixChat.tsx | 7 ------- test/unit-tests/components/structures/MatrixChat-test.tsx | 1 - 2 files changed, 8 deletions(-) diff --git a/src/components/structures/MatrixChat.tsx b/src/components/structures/MatrixChat.tsx index 8524938db9d..1d9637fa495 100644 --- a/src/components/structures/MatrixChat.tsx +++ b/src/components/structures/MatrixChat.tsx @@ -1698,13 +1698,6 @@ export default class MatrixChat extends React.PureComponent { if (crypto) { const blacklistEnabled = SettingsStore.getValueAt(SettingLevel.DEVICE, "blacklistUnverifiedDevices"); crypto.globalBlacklistUnverifiedDevices = blacklistEnabled; - - // With cross-signing enabled, we send to unknown devices - // without prompting. Any bad-device status the user should - // be aware of will be signalled through the room shield - // changing colour. More advanced behaviour will come once - // we implement more settings. - cli.setGlobalErrorOnUnknownDevices(false); } // Cannot be done in OnLoggedIn as at that point the AccountSettingsHandler doesn't yet have a client diff --git a/test/unit-tests/components/structures/MatrixChat-test.tsx b/test/unit-tests/components/structures/MatrixChat-test.tsx index a29834d51f7..12381027b04 100644 --- a/test/unit-tests/components/structures/MatrixChat-test.tsx +++ b/test/unit-tests/components/structures/MatrixChat-test.tsx @@ -125,7 +125,6 @@ describe("", () => { }), getVisibleRooms: jest.fn().mockReturnValue([]), getRooms: jest.fn().mockReturnValue([]), - setGlobalErrorOnUnknownDevices: jest.fn(), getCrypto: jest.fn().mockReturnValue({ getVerificationRequestsToDeviceInProgress: jest.fn().mockReturnValue([]), isCrossSigningReady: jest.fn().mockReturnValue(false), From b37b73214f00b439a847d98d88e2dae9bfab76d4 Mon Sep 17 00:00:00 2001 From: Florian Duros Date: Wed, 29 Jan 2025 17:55:53 +0100 Subject: [PATCH 2/2] test(e2e): remove `MatrixClient.setGlobalErrorOnUnknownDevices` call MatrixClient.setGlobalErrorOnUnknownDevices is not implemented in the rust-crypto and will be removed when the legacy crypto will be ripped out. --- playwright/pages/bot.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/playwright/pages/bot.ts b/playwright/pages/bot.ts index 435e4a1cbbb..28546bf5468 100644 --- a/playwright/pages/bot.ts +++ b/playwright/pages/bot.ts @@ -192,7 +192,6 @@ export class Bot extends Client { await clientHandle.evaluate(async (cli) => { await cli.initRustCrypto({ useIndexedDB: false }); - cli.setGlobalErrorOnUnknownDevices(false); await cli.startClient(); });