From ef9496119ee6c2031896dda9afda1d6dc349e7fc Mon Sep 17 00:00:00 2001 From: Cristi Paval Date: Thu, 15 Feb 2024 13:50:19 +0200 Subject: [PATCH] Do not show push notifications for whispers targeted to others --- src/libs/actions/Report.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/libs/actions/Report.ts b/src/libs/actions/Report.ts index b02d27daf03f..4a791dd41b31 100644 --- a/src/libs/actions/Report.ts +++ b/src/libs/actions/Report.ts @@ -1972,6 +1972,12 @@ function shouldShowReportActionNotification(reportID: string, action: ReportActi return false; } + // If this is a whisper targeted to someone else, don't show it + if (action && ReportActionsUtils.isWhisperActionTargetedToOthers(action)) { + Log.info(`${tag} No notification because the action is whispered to someone else`, false); + return false; + } + // Only show notifications for supported types of report actions if (!ReportActionsUtils.isNotifiableReportAction(action)) { Log.info(`${tag} No notification because this action type is not supported`, false, {actionName: action?.actionName});