Move push priority concerns from Event and Mention into Native push target

This commit is contained in:
Rosa Gutierrez
2026-01-22 13:12:53 +01:00
parent 34fd62faf1
commit 9299300dbf
3 changed files with 5 additions and 9 deletions
-4
View File
@@ -37,10 +37,6 @@ class Event < ApplicationRecord
Event::Description.new(self, user)
end
def high_priority_push?
action.card_assigned?
end
private
def dispatch_webhooks
Event::WebhookDispatchJob.perform_later(self)
-4
View File
@@ -18,10 +18,6 @@ class Mention < ApplicationRecord
source
end
def high_priority_push?
true
end
private
def watch_source_by_mentionee
source.watch_by(mentionee)
@@ -73,7 +73,11 @@ class Notification::PushTarget::Native < Notification::PushTarget
end
def high_priority_notification?
notification.source.high_priority_push?
case notification.source
when Event then notification.source.action.card_assigned?
when Mention then true
else false
end
end
def creator_avatar_url