Anchor to comments

This commit is contained in:
Jason Zimdars
2025-10-16 20:12:55 -05:00
parent 2f9fb2e20b
commit 0a4e5dafcb
+6 -1
View File
@@ -47,7 +47,8 @@ class NotificationPusher
when "comment_created"
base_payload.merge(
title: "RE: #{base_payload[:title]}",
body: comment_notification_body(event)
body: comment_notification_body(event),
path: card_path_with_comment_anchor(event.eventable)
)
when "card_assigned"
base_payload.merge(
@@ -111,4 +112,8 @@ class NotificationPusher
def card_path(card)
"#{Account.sole.slug}#{Rails.application.routes.url_helpers.card_path(card)}"
end
def card_path_with_comment_anchor(comment)
"#{Account.sole.slug}#{Rails.application.routes.url_helpers.card_path(comment.card, anchor: ActionView::RecordIdentifier.dom_id(comment))}"
end
end