mirror of
https://github.com/simplex-chat/simplex-chat.git
synced 2026-09-09 11:46:06 +00:00
directory: only create group links after approval (#7356)
* directory: only create group links after approval * update test * update messages * diff * get group and link in one query * reduce database reads * better errors * typos * query plans --------- Co-authored-by: Evgeny @ SimpleX Chat <259188159+evgeny-simplex@users.noreply.github.com>
This commit is contained in:
co-authored by
Evgeny @ SimpleX Chat
parent
ebe7396fea
commit
5e45fe1f0e
@@ -136,6 +136,7 @@ defaultChatConfig =
|
||||
relayRequestExpiry = (10, nominalDay),
|
||||
deviceNameForRemote = "",
|
||||
remoteCompression = True,
|
||||
updateGroupLinksFromApp = False,
|
||||
chatHooks = defaultChatHooks
|
||||
}
|
||||
|
||||
|
||||
@@ -172,6 +172,7 @@ data ChatConfig = ChatConfig
|
||||
highlyAvailable :: Bool,
|
||||
deviceNameForRemote :: Text,
|
||||
remoteCompression :: Bool,
|
||||
updateGroupLinksFromApp :: Bool,
|
||||
chatHooks :: ChatHooks
|
||||
}
|
||||
|
||||
|
||||
@@ -3747,7 +3747,8 @@ processAgentMessageConn cxt user@User {userId} corrId agentConnId agentMessage =
|
||||
createGroupFeatureChangedItems user cd CIRcvGroupFeature g g''
|
||||
-- in channels, link data is updated by the owner making the change in runUpdateGroupProfile;
|
||||
-- other owners receiving the update do not refresh the same link
|
||||
unless (useRelays' g'') $
|
||||
ChatConfig {updateGroupLinksFromApp} <- asks config
|
||||
unless (useRelays' g'' || updateGroupLinksFromApp) $
|
||||
void $ forkIO $ void $ setGroupLinkData' NRMBackground user g''
|
||||
Just _ -> updateGroupPrefs_ msgSigned g m $ fromMaybe defaultBusinessGroupPrefs $ groupPreferences p'
|
||||
-- relay advertises its web capability now that the owner's version is known (bumped by saveGroupRcvMsg)
|
||||
|
||||
Reference in New Issue
Block a user