Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 1 commit into from
Feb 15, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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)) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It might be clearer if the condition would get for whispers to you only and return true but NAB

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ah yes, but this requires more changes, I'll open a refactor PR that will be properly tested/QA'ed.

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
Loading