Don't send changeset comment notifications to deleted users
This commit is contained in:
parent
243129b671
commit
a082baebd7
2 changed files with 9 additions and 1 deletions
|
@ -327,7 +327,7 @@ class ChangesetController < ApplicationController
|
|||
:author => @user)
|
||||
|
||||
# Notify current subscribers of the new comment
|
||||
changeset.subscribers.each do |user|
|
||||
changeset.subscribers.visible.each do |user|
|
||||
if @user != user
|
||||
Notifier.changeset_comment_notification(comment, user).deliver_now
|
||||
end
|
||||
|
|
8
test/fixtures/changesets_subscribers.yml
vendored
8
test/fixtures/changesets_subscribers.yml
vendored
|
@ -5,3 +5,11 @@ t1:
|
|||
t2:
|
||||
changeset_id: 8
|
||||
subscriber_id: 1
|
||||
|
||||
t3:
|
||||
changeset_id: 8
|
||||
subscriber_id: 10
|
||||
|
||||
t4:
|
||||
changeset_id: 8
|
||||
subscriber_id: 11
|
||||
|
|
Loading…
Add table
Reference in a new issue