Fixed issue in notifications to show notifications GT not LT 7 days ago

• Fixed:
- issue in notifications to show notifications GT not LT 7 days ago
This commit is contained in:
mgabdev 2021-01-09 02:04:07 -05:00
parent e432c2effb
commit 5e82d71a9f
1 changed files with 1 additions and 1 deletions

View File

@ -42,7 +42,7 @@ class Notification < ApplicationRecord
validates :account_id, uniqueness: { scope: [:activity_type, :activity_id] } validates :account_id, uniqueness: { scope: [:activity_type, :activity_id] }
validates :activity_type, inclusion: { in: TYPE_CLASS_MAP.values } 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) { 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]) types = TYPE_CLASS_MAP.values - activity_types_from_types(exclude_types + [:follow_request])