From d05167b738cc906d00d9ba0f24c5a617cca82a10 Mon Sep 17 00:00:00 2001 From: Jeffrey Holland Date: Thu, 4 Sep 2025 13:44:41 +0200 Subject: [PATCH] Remove optional userId and deprecated method --- libs/common/src/vault/services/cipher.service.ts | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/libs/common/src/vault/services/cipher.service.ts b/libs/common/src/vault/services/cipher.service.ts index 3d29a5065aa..73290072568 100644 --- a/libs/common/src/vault/services/cipher.service.ts +++ b/libs/common/src/vault/services/cipher.service.ts @@ -598,7 +598,7 @@ export class CipherService implements CipherServiceAbstraction { async getAllDecryptedForUrl( url: string, - userId?: UserId, + userId: UserId, includeOtherTypes?: CipherType[], defaultMatch: UriMatchStrategySetting = null, ): Promise { @@ -619,10 +619,12 @@ export class CipherService implements CipherServiceAbstraction { } async getAllDecryptedForIds(userId: UserId, ids: string[]): Promise { - if (userId) { - const ciphers = await this.getAllDecrypted(userId); - return ciphers.filter((cipher) => ids.includes(cipher.id)); - } + return firstValueFrom( + this.cipherViews$(userId).pipe( + filter((ciphers) => ciphers != null), + map((ciphers) => ciphers.filter((cipher) => ids.includes(cipher.id))), + ), + ); } async filterCiphersForUrl(