Link comment notifications to the comment

This commit is contained in:
Kevin McConnell
2025-01-10 13:45:02 +00:00
parent 876083c697
commit 58ce85ce36
2 changed files with 11 additions and 3 deletions
+7 -3
View File
@@ -9,7 +9,7 @@ class Notifier
def generate
recipients.map do |recipient|
Notification.create! user: recipient, creator: event.creator, resource: bubble, body: body
Notification.create! user: recipient, creator: event.creator, resource: resource, body: body
end
end
@@ -27,10 +27,14 @@ class Notifier
end
def bubble
@event.summary.message.bubble
event.summary.message.bubble
end
def creator
@event.creator
event.creator
end
def resource
bubble
end
end
+4
View File
@@ -7,4 +7,8 @@ class Notifier::Commented < Notifier
def recipients
bubble.bucket.users.without(creator)
end
def resource
event.comment
end
end