No longer hide reactions and follows after 24 hours (#5314)
* No longer hide reactions and follows after 24 hours * Removes unused scope without_past_aggregations Co-authored-by: Molly Struve <mollylbs@gmail.com>
This commit is contained in:
parent
7dd2ae9fe0
commit
74da1ffc59
2 changed files with 1 additions and 5 deletions
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue