mirror of
https://github.com/simplex-chat/simplex-chat.git
synced 2026-04-26 15:18:01 +00:00
core: support closing/re-opening store on chat stop/start (#3132)
* core: support closing/re-opening store on chat stop/start * update .nix refs * kotlin: types * add test * update simplexmq
This commit is contained in:
committed by
GitHub
parent
8709ad6ff3
commit
3c7fc6b0ee
@@ -221,8 +221,8 @@ data ChatCommand
|
||||
| UnmuteUser
|
||||
| APIDeleteUser UserId Bool (Maybe UserPwd)
|
||||
| DeleteUser UserName Bool (Maybe UserPwd)
|
||||
| StartChat {subscribeConnections :: Bool, enableExpireChatItems :: Bool, startXFTPWorkers :: Bool}
|
||||
| APIStopChat
|
||||
| APIStartChat ChatCtrlCfg
|
||||
| APIStopChat {closeStore :: Bool}
|
||||
| APIActivateChat
|
||||
| APISuspendChat {suspendTimeout :: Int}
|
||||
| ResubscribeAllConnections
|
||||
@@ -620,6 +620,17 @@ instance ToJSON ChatResponse where
|
||||
toJSON = J.genericToJSON . sumTypeJSON $ dropPrefix "CR"
|
||||
toEncoding = J.genericToEncoding . sumTypeJSON $ dropPrefix "CR"
|
||||
|
||||
data ChatCtrlCfg = ChatCtrlCfg
|
||||
{ subConns :: Bool,
|
||||
enableExpireCIs :: Bool,
|
||||
startXFTPWorkers :: Bool,
|
||||
openDBWithKey :: Maybe DBEncryptionKey
|
||||
}
|
||||
deriving (Show, Generic, FromJSON)
|
||||
|
||||
defChatCtrlCfg :: ChatCtrlCfg
|
||||
defChatCtrlCfg = ChatCtrlCfg True True True Nothing
|
||||
|
||||
newtype UserPwd = UserPwd {unUserPwd :: Text}
|
||||
deriving (Eq, Show)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user