fix: ignore special chats when calculating similar chats

The second SQL statement calculating chat size
was already fixed in f656cb29be,
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.
This commit is contained in:
link2xt
2023-11-13 22:31:38 +00:00
parent e900d50e38
commit d4162899b4

View File

@@ -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)?;