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

avoid extra push notifications when editing desk members #2513

Conversation

petrjasek
Copy link
Member

  • only updated visible stages for users added/removed from desk
  • don't push resource:updated notifications when there are no fields updated.

SDANSA-526

- only updated visible stages for users added/removed from desk
- don't push `resource:updated` notifications when there are no fields updated.

SDANSA-526
@petrjasek petrjasek added this to the 2.6.8 milestone Feb 8, 2024
apps/desks.py Outdated
@@ -294,8 +294,12 @@ def __send_notification(self, updates, desk):
desk=desk.get("name"),
)
push_notification("activity", _dest=activity["recipients"])
get_resource_service("users").update_stage_visibility_for_user(user)
Copy link
Contributor

Choose a reason for hiding this comment

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

I see get_resource_service("users") 4 times in this function, might be good to store the service locally use it thereafter.

@petrjasek petrjasek merged commit 9c2957e into superdesk:hotfix/2.6.8 Feb 9, 2024
13 of 15 checks passed
@petrjasek petrjasek deleted the fix-desk-members-change-push-notifications branch February 9, 2024 09:58
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