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

Do not send desktop notification if user has toggled off global deskt… #2055

Closed

Conversation

thecalcc
Copy link
Contributor

@thecalcc thecalcc commented Aug 8, 2024

SDBELGA-818

Sending assignment desktop notifications should not be possible if the user has them toggled off in settings

@@ -355,6 +355,10 @@ def send_assignment_notification(self, updates, original=None, force=False):
if assigned_to_user and get_user_notification_preferences(assigned_to_user, "assignments")["email"] is False:
return

# No assignment desktop notification sent, if a user has disabled their global desktop notifications
if not assigned_to_user.get("user_preferences", {}).get("desktop:notification", {}).get("enabled", True):
Copy link
Member

Choose a reason for hiding this comment

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

If the user has an assignment mail toggle is on and desktop notification is off, so in this case nothing is going to happen, means user has not received any mail.

@devketanpro
Copy link
Member

devketanpro commented Aug 8, 2024

here is the PR for this issue:- #2056

@thecalcc you can close this one

@thecalcc thecalcc closed this Aug 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants