diff --git a/app/models/notification.rb b/app/models/notification.rb index e29fb1f14..40b6ad765 100644 --- a/app/models/notification.rb +++ b/app/models/notification.rb @@ -80,6 +80,12 @@ class Notification < ApplicationRecord end # rubocop:enable Metrics/CyclomaticComplexity + def conversation + return primary_actor.conversation if ['conversation_mention'].include? notification_type + + primary_actor + end + private def process_notification_delivery diff --git a/app/services/notification/push_notification_service.rb b/app/services/notification/push_notification_service.rb index d4510d59f..83cdfa08e 100644 --- a/app/services/notification/push_notification_service.rb +++ b/app/services/notification/push_notification_service.rb @@ -26,7 +26,7 @@ class Notification::PushNotificationService end def conversation - @conversation ||= notification.primary_actor + @conversation ||= notification.conversation end def push_message