mirror of
https://github.com/simplex-chat/simplex-chat.git
synced 2026-06-04 03:51:48 +00:00
core: SMP server connection test (#1367)
* core: SMP server connection test * fix test * update simplexmq
This commit is contained in:
committed by
GitHub
parent
fd34c39552
commit
f8302e2030
@@ -675,6 +675,7 @@ processChatCommand = \case
|
||||
ChatConfig {defaultServers = InitialAgentServers {smp = defaultSMPServers}} <- asks config
|
||||
withAgent $ \a -> setSMPServers a (fromMaybe defaultSMPServers (nonEmpty smpServers))
|
||||
pure CRCmdOk
|
||||
TestSMPServer smpServer -> CRSMPTestResult <$> withAgent (`testSMPServerConnection` smpServer)
|
||||
APISetChatItemTTL newTTL_ -> withUser' $ \user ->
|
||||
checkStoreNotChanged $
|
||||
withChatLock "setChatItemTTL" $ do
|
||||
@@ -3203,6 +3204,10 @@ chatCommandP =
|
||||
"/smp_servers default" $> SetUserSMPServers [],
|
||||
"/smp_servers " *> (SetUserSMPServers <$> smpServersP),
|
||||
"/smp_servers" $> GetUserSMPServers,
|
||||
"/smp default" $> SetUserSMPServers [],
|
||||
"/smp test " *> (TestSMPServer <$> strP),
|
||||
"/smp " *> (SetUserSMPServers <$> smpServersP),
|
||||
"/smp" $> GetUserSMPServers,
|
||||
"/_ttl " *> (APISetChatItemTTL <$> ciTTLDecimal),
|
||||
"/ttl " *> (APISetChatItemTTL <$> ciTTL),
|
||||
"/ttl" $> APIGetChatItemTTL,
|
||||
|
||||
Reference in New Issue
Block a user