From 2016a0efded2e66a004ae589e744e41fa89a929a Mon Sep 17 00:00:00 2001 From: spaced4ndy <8711996+spaced4ndy@users.noreply.github.com> Date: Mon, 18 Sep 2023 13:22:18 +0400 Subject: [PATCH] don't check connections in deleteUnusedProfile_ --- src/Simplex/Chat/Store/Direct.hs | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/Simplex/Chat/Store/Direct.hs b/src/Simplex/Chat/Store/Direct.hs index 9c45129385..69291313b5 100644 --- a/src/Simplex/Chat/Store/Direct.hs +++ b/src/Simplex/Chat/Store/Direct.hs @@ -275,10 +275,6 @@ deleteUnusedProfile_ db userId profileId = [sql| DELETE FROM contact_profiles WHERE user_id = :user_id AND contact_profile_id = :profile_id - AND 1 NOT IN ( - SELECT 1 FROM connections - WHERE user_id = :user_id AND custom_user_profile_id = :profile_id LIMIT 1 - ) AND 1 NOT IN ( SELECT 1 FROM contacts WHERE user_id = :user_id AND contact_profile_id = :profile_id LIMIT 1