Make sure notifications jobs don't need Current.account set

This commit is contained in:
Mike Dalessio
2025-11-14 15:14:26 -05:00
parent 4976e4a7bb
commit 29aa0f7fea
+3 -3
View File
@@ -88,7 +88,7 @@ class NotificationPusher
{
title: "New notification",
body: "You have a new notification",
path: "#{Current.account.slug}#{notifications_path}"
path: "#{notification.account.slug}#{notifications_path}"
}
end
@@ -110,10 +110,10 @@ class NotificationPusher
end
def card_path(card)
"#{Current.account.slug}#{Rails.application.routes.url_helpers.card_path(card)}"
"#{notification.account.slug}#{Rails.application.routes.url_helpers.card_path(card)}"
end
def card_path_with_comment_anchor(comment)
"#{Current.account.slug}#{Rails.application.routes.url_helpers.card_path(comment.card, anchor: ActionView::RecordIdentifier.dom_id(comment))}"
"#{notification.account.slug}#{Rails.application.routes.url_helpers.card_path(comment.card, anchor: ActionView::RecordIdentifier.dom_id(comment))}"
end
end