mirror of
https://github.com/simplex-chat/simplex-chat.git
synced 2026-09-17 05:55:01 +00:00
core: only include mentions in unread count for groups with mentions-only notifications (#5601)
* core: only include mentions in unread count for groups with mentions-only notifications * remove whitespace * update nft servers * update query plans
This commit is contained in:
@@ -154,7 +154,8 @@ Query:
|
||||
SELECT COUNT(1)
|
||||
FROM chat_items i
|
||||
JOIN groups g USING (group_id)
|
||||
WHERE i.user_id = ? AND i.item_status = ? AND (g.enable_ntfs = 1 OR g.enable_ntfs IS NULL)
|
||||
WHERE i.user_id = ? AND i.item_status = ?
|
||||
AND (g.enable_ntfs = 1 OR g.enable_ntfs IS NULL OR (g.enable_ntfs = 2 AND i.user_mention = 1))
|
||||
|
||||
Plan:
|
||||
SEARCH i USING COVERING INDEX idx_chat_items_groups_user_mention (user_id=?)
|
||||
|
||||
Reference in New Issue
Block a user