From 82c44793b1d16f5b265875e2a564ef94bbccf631 Mon Sep 17 00:00:00 2001 From: spaced4ndy <8711996+spaced4ndy@users.noreply.github.com> Date: Fri, 15 May 2026 14:31:59 +0400 Subject: [PATCH] wip --- src/Simplex/Chat/Library/Commands.hs | 2 +- src/Simplex/Chat/Store/Groups.hs | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Simplex/Chat/Library/Commands.hs b/src/Simplex/Chat/Library/Commands.hs index 29afe8084d..c679c1ec9a 100644 --- a/src/Simplex/Chat/Library/Commands.hs +++ b/src/Simplex/Chat/Library/Commands.hs @@ -1582,7 +1582,7 @@ processChatCommand vr nm = \case TestChatRelay address -> withUser $ \User {userId} -> processChatCommand vr nm $ APITestChatRelay userId address APIAllowRelayGroup groupId -> withUser $ \user -> do - gInfo' <- withStore $ \db -> allowRelayGroupAndSiblings db vr user groupId + gInfo' <- withStore $ \db -> allowRelayGroup db vr user groupId pure $ CRRelayGroupAllowed user gInfo' GetUserChatRelays -> withUser $ \user -> do srvs <- withFastStore (`getUserServers` user) diff --git a/src/Simplex/Chat/Store/Groups.hs b/src/Simplex/Chat/Store/Groups.hs index aeb793f6dd..b41411ce95 100644 --- a/src/Simplex/Chat/Store/Groups.hs +++ b/src/Simplex/Chat/Store/Groups.hs @@ -96,7 +96,7 @@ module Simplex.Chat.Store.Groups updateRelayOwnStatusFromTo, updateRelayOwnStatus_, isRelayGroupRejected, - allowRelayGroupAndSiblings, + allowRelayGroup, getRelayServedGroups, getRelayInactiveGroups, createNewContactMemberAsync, @@ -1603,8 +1603,8 @@ updateRelayOwnStatus_ db GroupInfo {groupId} relayStatus = do -- for the targeted groupId (whether it was flipped or not). The subquery -- resolves the link in the same UPDATE statement so there is no -- read-then-write race with concurrent xGrpRelayInv handlers. -allowRelayGroupAndSiblings :: DB.Connection -> VersionRangeChat -> User -> GroupId -> ExceptT StoreError IO GroupInfo -allowRelayGroupAndSiblings db vr user@User {userId} groupId = do +allowRelayGroup :: DB.Connection -> VersionRangeChat -> User -> GroupId -> ExceptT StoreError IO GroupInfo +allowRelayGroup db vr user@User {userId} groupId = do currentTs <- liftIO getCurrentTime liftIO $ DB.execute