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:
Jason Zimdars
2025-09-11 21:21:11 -05:00
parent 34e5b14b58
commit c4dec29b49
2 changed files with 9 additions and 1 deletions
+1 -1
View File
@@ -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