Skip to content

Commit

Permalink
Merge pull request #36570 from Expensify/cristi_dont-pushnotify-whisp…
Browse files Browse the repository at this point in the history
…ers-for-others

[CP Staging][No QA] Do not show push notifications for whispers targeted to others

(cherry picked from commit 7512e25)
  • Loading branch information
cristipaval authored and OSBotify committed Feb 15, 2024
1 parent ae08166 commit f4172a5
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/libs/actions/Report.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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});
Expand Down

0 comments on commit f4172a5

Please sign in to comment.