Progress
This commit is contained in:
@@ -43,11 +43,17 @@ class Notification < ApplicationRecord
|
||||
|
||||
scope :browserable, ->(exclude_types = [], account_id = nil) {
|
||||
types = TYPE_CLASS_MAP.values - activity_types_from_types(exclude_types + [:follow_request])
|
||||
if account_id.nil?
|
||||
where(activity_type: types)
|
||||
else
|
||||
where(activity_type: types, from_account_id: account_id)
|
||||
end
|
||||
# if account_id.nil?
|
||||
puts "-----VERTS------"
|
||||
Notification.includes(:from_account).where(activity_type: types, accounts: {
|
||||
is_verified: true
|
||||
})
|
||||
# joins(:account).where({ 'from_account.id' => 6 })
|
||||
# is_verified: false
|
||||
# )
|
||||
# els
|
||||
# where(activity_type: types, from_account_id: account_id)
|
||||
# end
|
||||
}
|
||||
|
||||
cache_associated :from_account, status: STATUS_INCLUDES, mention: [status: STATUS_INCLUDES], favourite: [:account, status: STATUS_INCLUDES], follow: :account, poll: [status: STATUS_INCLUDES]
|
||||
|
||||
Reference in New Issue
Block a user