Skip to content

Commit

Permalink
Merge pull request Expensify#36570 from Expensify/cristi_dont-pushnot…
Browse files Browse the repository at this point in the history
…ify-whispers-for-others

[CP Staging][No QA] Do not show push notifications for whispers targeted to others
  • Loading branch information
cristipaval authored Feb 15, 2024
2 parents 69ac0d7 + ef94961 commit 7512e25
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 7512e25

Please sign in to comment.