Skip to content

Commit 8cf7c12

Browse files
committed
1 parent d10866c commit 8cf7c12

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/vs/workbench/browser/parts/notifications/notificationsActions.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -166,9 +166,12 @@ export class NotificationActionRunner extends ActionRunner {
166166
super();
167167
}
168168

169-
protected async runAction(action: IAction, context: INotificationViewItem): Promise<void> {
169+
protected async runAction(action: IAction, context: INotificationViewItem | undefined): Promise<void> {
170170
this.telemetryService.publicLog2<WorkbenchActionExecutedEvent, WorkbenchActionExecutedClassification>('workbenchActionExecuted', { id: action.id, from: 'message' });
171-
this.telemetryService.publicLog2<NotificationActionMetrics, NotificationActionMetricsClassification>('notification:actionExecuted', { id: hash(context.message.original.toString()), actionLabel: action.label, source: context.sourceId });
171+
if (context) {
172+
// If the context is not present it is a "global" notification action. Will be captured by other events
173+
this.telemetryService.publicLog2<NotificationActionMetrics, NotificationActionMetricsClassification>('notification:actionExecuted', { id: hash(context.message.original.toString()), actionLabel: action.label, source: context.sourceId });
174+
}
172175

173176
// Run and make sure to notify on any error again
174177
try {

0 commit comments

Comments
 (0)