fix: Unread notification count in multiple accounts (#4373)
Fixes: #4367
This commit is contained in:
@@ -188,10 +188,10 @@ class User < ApplicationRecord
|
||||
mutations_from_database.changed?('email')
|
||||
end
|
||||
|
||||
def notifications_meta
|
||||
def notifications_meta(account_id)
|
||||
{
|
||||
unread_count: notifications.where(read_at: nil).count,
|
||||
count: notifications.count
|
||||
unread_count: notifications.where(account_id: account_id, read_at: nil).count,
|
||||
count: notifications.where(account_id: account_id).count
|
||||
}
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user