1
0
mirror of https://github.com/matrix-org/matrix-js-sdk.git synced 2025-07-30 04:23:07 +03:00

ElementR: Add CryptoApi.findVerificationRequestDMInProgress (#3601)

* Add `CryptoApi.findVerificationRequestDMInProgress`

* Fix linting and missing parameters

* Move `ROOM_ID` into `test-data`

* Remove verification request from `EventDecryptor` pending list

* Fix duplicate timeline event processing

* Add extra documentation

* Try to fix sonar error

* Use `roomId`

* Fix typo

* Review changes

* Review changes

* Fix `initRustCrypto` jsdoc

* Listen to `ClientEvent.Event` instead of `RoomEvent.Timeline`

* Fix missing room id in `generate-test-data.py`

* Review changes

* Review changes

* Handle encrypted event

* Fix linting

* Comments and run timers

* Ignore 404

* Fix test
This commit is contained in:
Florian Duros
2023-07-31 17:00:15 +02:00
committed by GitHub
parent 1744f0e97b
commit 0ada9803ab
10 changed files with 395 additions and 69 deletions

View File

@ -576,6 +576,13 @@ describe("RustCrypto", () => {
expect(await rustCrypto.getActiveSessionBackupVersion()).toBeNull();
});
});
describe("findVerificationRequestDMInProgress", () => {
it("returns undefined if the userId is not provided", async () => {
const rustCrypto = await makeTestRustCrypto();
expect(rustCrypto.findVerificationRequestDMInProgress(testData.TEST_ROOM_ID)).not.toBeDefined();
});
});
});
/** build a basic RustCrypto instance for testing