mirror of
https://github.com/discourse/discourse.git
synced 2025-01-31 08:12:02 +08:00
filter out archived correctly
This commit is contained in:
parent
b75353c26f
commit
5ed21e8767
|
@ -153,7 +153,7 @@ class PostAlerter
|
||||||
inbox_count: Topic.exec_sql(
|
inbox_count: Topic.exec_sql(
|
||||||
"SELECT COUNT(*) FROM topics t
|
"SELECT COUNT(*) FROM topics t
|
||||||
JOIN topic_allowed_groups g ON g.group_id = :group_id AND g.topic_id = t.id
|
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'",
|
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
|
group_id: g.id).values[0][0].to_i
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user