Add plain text mentions

This commit is contained in:
Jorge Manrubia
2025-04-22 11:21:30 +02:00
parent 5b10b3a16e
commit aa3acfeaa8
41 changed files with 493 additions and 168 deletions
-6
View File
@@ -1,6 +0,0 @@
class Notifier::Assigned < Notifier
private
def recipients
event.assignees.excluding(card.collection.access_only_users)
end
end
-2
View File
@@ -1,2 +0,0 @@
class Notifier::Closed < Notifier
end
-6
View File
@@ -1,6 +0,0 @@
class Notifier::Commented < Notifier
private
def resource
event.comment
end
end
+6
View File
@@ -0,0 +1,6 @@
class Notifier::Events::Assigned < Notifier::Events::Base
private
def recipients
source.assignees.excluding(card.collection.access_only_users)
end
end
+12
View File
@@ -0,0 +1,12 @@
class Notifier::Events::Base < Notifier
delegate :card, to: :source
private
def resource
card
end
def recipients
card.watchers_and_subscribers.without(creator)
end
end
+2
View File
@@ -0,0 +1,2 @@
class Notifier::Events::Closed < Notifier::Events::Base
end
+6
View File
@@ -0,0 +1,6 @@
class Notifier::Events::Commented < Notifier::Events::Base
private
def resource
source.comment
end
end
@@ -1,4 +1,4 @@
class Notifier::Published < Notifier
class Notifier::Events::Published < Notifier::Events::Base
private
def recipients
card.watchers_and_subscribers(include_only_watching: true).without(creator)