From d4162899b4d8092c74594f30908c81ee1efe0add Mon Sep 17 00:00:00 2001 From: link2xt Date: Mon, 13 Nov 2023 22:31:38 +0000 Subject: [PATCH] fix: ignore special chats when calculating similar chats The second SQL statement calculating chat size was already fixed in f656cb29be8ac23f854859c13e70109009441f63, but more important statement calculating member list intersection was overlooked. As a result, trash chat with members added there due to former bugs could still appear in similar chats. --- src/chat.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/chat.rs b/src/chat.rs index 4633a36e3..99f7e9543 100644 --- a/src/chat.rs +++ b/src/chat.rs @@ -993,8 +993,9 @@ impl ChatId { AND y.contact_id > 9 AND x.chat_id=? AND y.chat_id<>x.chat_id + AND y.chat_id>? GROUP BY y.chat_id", - (self,), + (self, DC_CHAT_ID_LAST_SPECIAL), |row| { let chat_id: ChatId = row.get(0)?; let intersection: f64 = row.get(1)?;