diff --git a/apps/browser/src/autofill/background/notification.background.ts b/apps/browser/src/autofill/background/notification.background.ts index dabb75b97b6..0b9c6244987 100644 --- a/apps/browser/src/autofill/background/notification.background.ts +++ b/apps/browser/src/autofill/background/notification.background.ts @@ -160,51 +160,42 @@ export default class NotificationBackground { /** * - * Gets the current active tab and retrieves all decrypted ciphers - * for the tab's URL. It constructs and returns an array of `NotificationCipherData` objects. + * Gets the current active tab and retrieves the relevant decrypted cipher + * for the tab's URL. It constructs and returns an array of `NotificationCipherData` objects or a singular object. * If no active tab or URL is found, it returns an empty array. * * @returns {Promise} */ async getNotificationCipherData(): Promise { - const [currentTab, showFavicons, env] = await Promise.all([ + const [currentTab, showFavicons, env, activeUserId] = await Promise.all([ BrowserApi.getTabFromCurrentWindow(), firstValueFrom(this.domainSettingsService.showFavicons$), firstValueFrom(this.environmentService.environment$), + firstValueFrom(this.accountService.activeAccount$.pipe(getOptionalUserId)), + ]); + + const [decryptedCiphers, organizations] = await Promise.all([ + this.cipherService.getAllDecryptedForUrl(currentTab?.url, activeUserId), + firstValueFrom(this.organizationService.organizations$(activeUserId)), ]); const iconsServerUrl = env.getIconsUrl(); - const activeUserId = await firstValueFrom( - this.accountService.activeAccount$.pipe(getOptionalUserId), - ); - const decryptedCiphers = await this.cipherService.getAllDecryptedForUrl( - currentTab?.url, - activeUserId, - ); - - const organizations = await firstValueFrom( - this.organizationService.organizations$(activeUserId), - ); - - return decryptedCiphers.map((view) => { + const toNotificationData = (view: CipherView): NotificationCipherData => { const { id, name, reprompt, favorite, login, organizationId } = view; - const organizationType = organizationId - ? organizations.find((org) => org.id === organizationId)?.productTierType - : null; + const type = organizations.find((org) => org.id === organizationId)?.productTierType; const organizationCategories: OrganizationCategory[] = []; - if ( [ProductTierType.Teams, ProductTierType.Enterprise, ProductTierType.TeamsStarter].includes( - organizationType, + type, ) ) { organizationCategories.push(OrganizationCategories.business); } - if ([ProductTierType.Families, ProductTierType.Free].includes(organizationType)) { + if ([ProductTierType.Families, ProductTierType.Free].includes(type)) { organizationCategories.push(OrganizationCategories.family); } @@ -216,11 +207,21 @@ export default class NotificationBackground { favorite, ...(organizationCategories.length ? { organizationCategories } : {}), icon: buildCipherIcon(iconsServerUrl, view, showFavicons), - login: login && { - username: login.username, - }, + login: login && { username: login.username }, }; - }); + }; + + const changeItem = this.notificationQueue.find( + (message): message is AddChangePasswordQueueMessage => + message.type === NotificationQueueMessageType.ChangePassword, + ); + + if (changeItem) { + const cipherView = await this.getDecryptedCipherById(changeItem.cipherId, activeUserId); + return [toNotificationData(cipherView)]; + } + + return decryptedCiphers.map(toNotificationData); } /** diff --git a/apps/browser/src/safari/desktop/Info.plist b/apps/browser/src/safari/desktop/Info.plist index 69ea518a0ae..b687d9d2f3a 100644 --- a/apps/browser/src/safari/desktop/Info.plist +++ b/apps/browser/src/safari/desktop/Info.plist @@ -25,7 +25,7 @@ LSMinimumSystemVersion $(MACOSX_DEPLOYMENT_TARGET) NSHumanReadableCopyright - Copyright © 2015-2024 Bitwarden Inc. All rights reserved. + Copyright © 2015-2025 Bitwarden Inc. All rights reserved. NSMainStoryboardFile Main NSPrincipalClass diff --git a/apps/browser/src/safari/safari/Info.plist b/apps/browser/src/safari/safari/Info.plist index b79ed132ea9..95172846758 100644 --- a/apps/browser/src/safari/safari/Info.plist +++ b/apps/browser/src/safari/safari/Info.plist @@ -30,7 +30,7 @@ $(PRODUCT_MODULE_NAME).SafariWebExtensionHandler NSHumanReadableCopyright - Copyright © 2015-2024 Bitwarden Inc. All rights reserved. + Copyright © 2015-2025 Bitwarden Inc. All rights reserved. NSHumanReadableDescription A secure and free password manager for all of your devices. SFSafariAppExtensionBundleIdentifiersToReplace diff --git a/apps/cli/stores/chocolatey/bitwarden-cli.nuspec b/apps/cli/stores/chocolatey/bitwarden-cli.nuspec index e5ce03fa49d..f7f86bc843f 100644 --- a/apps/cli/stores/chocolatey/bitwarden-cli.nuspec +++ b/apps/cli/stores/chocolatey/bitwarden-cli.nuspec @@ -10,7 +10,7 @@ Bitwarden Inc. https://bitwarden.com/ https://raw.githubusercontent.com/bitwarden/brand/master/icons/256x256.png - Copyright © 2015-2024 Bitwarden Inc. + Copyright © 2015-2025 Bitwarden Inc. https://github.com/bitwarden/clients/ https://help.bitwarden.com/article/cli/ https://github.com/bitwarden/clients/issues diff --git a/apps/desktop/electron-builder.json b/apps/desktop/electron-builder.json index 925706bec7b..d51d9412d80 100644 --- a/apps/desktop/electron-builder.json +++ b/apps/desktop/electron-builder.json @@ -5,7 +5,7 @@ "productName": "Bitwarden", "appId": "com.bitwarden.desktop", "buildDependenciesFromSource": true, - "copyright": "Copyright © 2015-2024 Bitwarden Inc.", + "copyright": "Copyright © 2015-2025 Bitwarden Inc.", "directories": { "buildResources": "resources", "output": "dist", diff --git a/apps/desktop/stores/chocolatey/bitwarden.nuspec b/apps/desktop/stores/chocolatey/bitwarden.nuspec index dc95703614d..450fa734736 100644 --- a/apps/desktop/stores/chocolatey/bitwarden.nuspec +++ b/apps/desktop/stores/chocolatey/bitwarden.nuspec @@ -10,7 +10,7 @@ Bitwarden Inc. https://bitwarden.com/ https://raw.githubusercontent.com/bitwarden/brand/master/icons/256x256.png - Copyright © 2015-2024 Bitwarden Inc. + Copyright © 2015-2025 Bitwarden Inc. https://github.com/bitwarden/clients/ https://bitwarden.com/help/ https://github.com/bitwarden/clients/issues