1
0
mirror of https://github.com/matrix-org/matrix-js-sdk.git synced 2025-11-23 17:02:25 +03:00

Throw error if missing userId in CryptoApi.findVerificationRequestDMInProgress (#3641)

This commit is contained in:
Florian Duros
2023-08-01 14:20:01 +02:00
committed by GitHub
parent 5a782b7377
commit 2e9b34e0c3
2 changed files with 5 additions and 4 deletions

View File

@@ -686,8 +686,7 @@ export class RustCrypto extends TypedEventEmitter<RustCryptoEvents, RustCryptoEv
*
*/
public findVerificationRequestDMInProgress(roomId: string, userId?: string): VerificationRequest | undefined {
// TODO raise an error
if (!userId) return;
if (!userId) throw new Error("missing userId");
const requests: RustSdkCryptoJs.VerificationRequest[] = this.olmMachine.getVerificationRequests(
new RustSdkCryptoJs.UserId(userId),