Skip to content

Commit

Permalink
Don't send changeset comment notifications to deleted users
Browse files Browse the repository at this point in the history
  • Loading branch information
tomhughes committed Oct 30, 2015
1 parent 243129b commit a082bae
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
2 changes: 1 addition & 1 deletion app/controllers/changeset_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -327,7 +327,7 @@ def comment
: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
Expand Down
8 changes: 8 additions & 0 deletions test/fixtures/changesets_subscribers.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit a082bae

Please sign in to comment.