Assignment notifications should always be delivered
- They're effectively @mentions - This means watching really reflects the UI state: Watching for new cards
This commit is contained in:
@@ -6,7 +6,7 @@ class Notifier::CardEventNotifier < Notifier
|
||||
def recipients
|
||||
case source.action
|
||||
when "card_assigned"
|
||||
source.assignees.excluding(creator, *source.collection.access_only_users)
|
||||
source.assignees.excluding(creator)
|
||||
when "card_published"
|
||||
watchers_and_subscribers(include_only_watching: true).without(creator, *card.mentionees)
|
||||
when "comment_created"
|
||||
|
||||
@@ -87,4 +87,12 @@ class Notifier::EventNotifierTest < ActiveSupport::TestCase
|
||||
Notifier.for(events(:layout_commented)).notify
|
||||
end
|
||||
end
|
||||
|
||||
test "assignment events notify assignees regardless of involvement level" do
|
||||
collections(:writebook).access_for(users(:jz)).access_only!
|
||||
|
||||
notifications = Notifier.for(events(:logo_assignment_jz)).notify
|
||||
|
||||
assert_equal [ users(:jz) ], notifications.map(&:user)
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user