From c536ca7f0f81dc72905e9e56caccb767652c2621 Mon Sep 17 00:00:00 2001 From: Evgeny Poberezkin <2769109+epoberezkin@users.noreply.github.com> Date: Mon, 20 Nov 2023 10:34:24 +0000 Subject: [PATCH] core: add events not sent to connected remote desktop (#3402) --- src/Simplex/Chat/Controller.hs | 24 ++++++++++++++++++------ 1 file changed, 18 insertions(+), 6 deletions(-) diff --git a/src/Simplex/Chat/Controller.hs b/src/Simplex/Chat/Controller.hs index 2ccc2ca12e..7533649c69 100644 --- a/src/Simplex/Chat/Controller.hs +++ b/src/Simplex/Chat/Controller.hs @@ -686,17 +686,29 @@ data ChatResponse | CRTimedAction {action :: String, durationMilliseconds :: Int64} deriving (Show) +-- some of these can only be used as command responses allowRemoteEvent :: ChatResponse -> Bool allowRemoteEvent = \case - CRRemoteHostList {} -> False - CRRemoteHostConnected {} -> False - CRRemoteHostStopped {} -> False - CRRemoteCtrlList {} -> False - CRRemoteCtrlFound {} -> False + CRChatStarted -> False + CRChatRunning -> False + CRChatStopped -> False + CRChatSuspended -> False + CRRemoteHostList _ -> False + CRCurrentRemoteHost _ -> False + CRRemoteHostStarted {} -> False + CRRemoteHostSessionCode {} -> False + CRNewRemoteHost _ -> False + CRRemoteHostConnected _ -> False + CRRemoteHostStopped _ -> False + CRRemoteFileStored {} -> False + CRRemoteCtrlList _ -> False + CRRemoteCtrlFound _ -> False CRRemoteCtrlConnecting {} -> False CRRemoteCtrlSessionCode {} -> False - CRRemoteCtrlConnected {} -> False + CRRemoteCtrlConnected _ -> False CRRemoteCtrlStopped -> False + CRSQLResult _ -> False + CRSlowSQLQueries {} -> False _ -> True logResponseToFile :: ChatResponse -> Bool