diff --git a/app/models/event.rb b/app/models/event.rb index 6ba11a28d..bbbf2a60c 100644 --- a/app/models/event.rb +++ b/app/models/event.rb @@ -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) diff --git a/app/models/mention.rb b/app/models/mention.rb index 66a02428a..5491bfd9f 100644 --- a/app/models/mention.rb +++ b/app/models/mention.rb @@ -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) diff --git a/saas/app/models/notification/push_target/native.rb b/saas/app/models/notification/push_target/native.rb index d2e86ead4..38f3e5eb4 100644 --- a/saas/app/models/notification/push_target/native.rb +++ b/saas/app/models/notification/push_target/native.rb @@ -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