From 5e82d71a9f31db5eb2fb9fb81c18b3a5a4d5761e Mon Sep 17 00:00:00 2001 From: mgabdev <> Date: Sat, 9 Jan 2021 02:04:07 -0500 Subject: [PATCH] Fixed issue in notifications to show notifications GT not LT 7 days ago MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit • Fixed: - issue in notifications to show notifications GT not LT 7 days ago --- app/models/notification.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/notification.rb b/app/models/notification.rb index 3b7615c1..135ce438 100644 --- a/app/models/notification.rb +++ b/app/models/notification.rb @@ -42,7 +42,7 @@ class Notification < ApplicationRecord validates :account_id, uniqueness: { scope: [:activity_type, :activity_id] } validates :activity_type, inclusion: { in: TYPE_CLASS_MAP.values } - scope :latest, -> { where('created_at < ?', 7.days.ago) } + scope :latest, -> { where('created_at > ?', 7.days.ago) } scope :browserable, ->(exclude_types = [], account_id = nil, only_verified = false, only_following = false) { types = TYPE_CLASS_MAP.values - activity_types_from_types(exclude_types + [:follow_request])