mirror of
https://github.com/simplex-chat/simplex-chat.git
synced 2026-05-25 02:05:40 +00:00
wip
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user