diff --git a/app/controllers/notifications_controller.rb b/app/controllers/notifications_controller.rb index 1db06617f..bdc045e44 100644 --- a/app/controllers/notifications_controller.rb +++ b/app/controllers/notifications_controller.rb @@ -26,7 +26,7 @@ class NotificationsController < ApplicationController @user.notifications end - @notifications = @notifications.without_past_aggregations.order(notified_at: :desc) + @notifications = @notifications.order(notified_at: :desc) # if offset based pagination is invoked by the frontend code, we filter out all earlier ones @notifications = @notifications.where("notified_at < ?", notified_at_offset) if notified_at_offset diff --git a/app/models/notification.rb b/app/models/notification.rb index e0b5ef7a7..847c64af7 100644 --- a/app/models/notification.rb +++ b/app/models/notification.rb @@ -22,10 +22,6 @@ class Notification < ApplicationRecord where(organization_id: org_id, notifiable_type: "Mention", user_id: nil) } - scope :without_past_aggregations, lambda { - where.not("notified_at < ? AND action IN ('Reaction', 'Follow')", 24.hours.ago) - } - class << self def send_new_follower_notification(follow, is_read = false) return unless Follow.need_new_follower_notification_for?(follow.followable_type)