filter out archived correctly
This commit is contained in:
parent
b75353c26f
commit
5ed21e8767
|
@ -153,7 +153,7 @@ class PostAlerter
|
|||
inbox_count: Topic.exec_sql(
|
||||
"SELECT COUNT(*) FROM topics t
|
||||
JOIN topic_allowed_groups g ON g.group_id = :group_id AND g.topic_id = t.id
|
||||
LEFT JOIN group_archived_messages a ON a.topic_id = t.id AND a.group_id = g.id
|
||||
LEFT JOIN group_archived_messages a ON a.topic_id = t.id AND a.group_id = g.group_id
|
||||
WHERE a.id IS NULL AND t.deleted_at is NULL AND t.archetype = 'private_message'",
|
||||
group_id: g.id).values[0][0].to_i
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue