Skip to content

Commit

Permalink
[PM-15557] Log the Cipher_ClientViewed event when opening the VaultIt…
Browse files Browse the repository at this point in the history
…emDialog (#12669)
  • Loading branch information
shane-melton authored Jan 6, 2025
1 parent e75a38c commit 828a7fe
Showing 1 changed file with 10 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,11 @@ import { map } from "rxjs/operators";

import { CollectionView } from "@bitwarden/admin-console/common";
import { ApiService } from "@bitwarden/common/abstractions/api.service";
import { EventCollectionService } from "@bitwarden/common/abstractions/event/event-collection.service";
import { Organization } from "@bitwarden/common/admin-console/models/domain/organization";
import { AccountService } from "@bitwarden/common/auth/abstractions/account.service";
import { BillingAccountProfileStateService } from "@bitwarden/common/billing/abstractions";
import { EventType } from "@bitwarden/common/enums";
import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service";
import { LogService } from "@bitwarden/common/platform/abstractions/log.service";
import { MessagingService } from "@bitwarden/common/platform/abstractions/messaging.service";
Expand Down Expand Up @@ -237,6 +239,7 @@ export class VaultItemDialogComponent implements OnInit, OnDestroy {
private premiumUpgradeService: PremiumUpgradePromptService,
private cipherAuthorizationService: CipherAuthorizationService,
private apiService: ApiService,
private eventCollectionService: EventCollectionService,
) {
this.updateTitle();
}
Expand All @@ -257,6 +260,13 @@ export class VaultItemDialogComponent implements OnInit, OnDestroy {
[this.params.activeCollectionId],
this.params.isAdminConsoleAction,
);

await this.eventCollectionService.collect(
EventType.Cipher_ClientViewed,
this.cipher.id,
false,
this.cipher.organizationId,
);
}

this.performingInitialLoad = false;
Expand Down

0 comments on commit 828a7fe

Please sign in to comment.