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

Don't send notifications about past SSRs when turning on info notifications #2783

Merged
merged 5 commits into from
Aug 14, 2023

Conversation

vstpme
Copy link
Member

@vstpme vstpme commented Aug 11, 2023

What this PR does

Fixes a bug when a user is receiving push notifications about past SSRs after turning on the info notifications in the mobile app.

Checklist

  • Unit, integration, and e2e (if applicable) tests updated
  • Documentation added (or pr:no public docs PR label added if not required)
  • CHANGELOG.md updated (or pr:no changelog PR label added if not required)

@vstpme vstpme added the pr:no public docs Added to a PR that does not require public documentation updates label Aug 11, 2023
@vstpme vstpme marked this pull request as ready for review August 11, 2023 15:06
@vstpme vstpme requested a review from a team August 11, 2023 15:06
engine/apps/mobile_app/tests/test_shift_swap_request.py Outdated Show resolved Hide resolved
@@ -595,10 +595,10 @@ def _should_notify_user_about_shift_swap_request(
except MobileAppUserSettings.DoesNotExist:
return False # don't notify if the app is not configured

return (
mobile_app_user_settings.info_notifications_enabled # info notifications must be enabled
Copy link
Contributor

Choose a reason for hiding this comment

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

If I understand it ok, the idea is to flag the swap request as notified if a notification should have been sent while notifications are disabled, so when enabling we don't try to send it later, right?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes, that's the idea

@vstpme vstpme added this pull request to the merge queue Aug 14, 2023
Merged via the queue into dev with commit a9bf4f5 Aug 14, 2023
@vstpme vstpme deleted the vadimkerr/past-ssr-notifications branch August 14, 2023 10:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pr:no public docs Added to a PR that does not require public documentation updates
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants