Commit 3208dad1e7e0c1eeb638e5a2779a290ed9c3e73a

Authored by Dmitriy Zaporozhets
1 parent 99eb9607

Respect group membership in notification service

Showing 1 changed file with 4 additions and 0 deletions   Show diff stats
app/services/notification_service.rb
... ... @@ -174,6 +174,10 @@ class NotificationService
174 174  
175 175 tm = project.users_projects.find_by_user_id(user.id)
176 176  
  177 + if !tm && project.group
  178 + tm = project.users_groups.find_by_user_id(user.id)
  179 + end
  180 +
177 181 # reject users who globally disabled notification and has no membership
178 182 next user.notification.disabled? unless tm
179 183  
... ...