diff --git a/src/Simplex/Chat.hs b/src/Simplex/Chat.hs index 4530f59f37..a5ba74c9f8 100644 --- a/src/Simplex/Chat.hs +++ b/src/Simplex/Chat.hs @@ -2189,10 +2189,12 @@ processChatCommand' vr = \case RcvFileConnection {entityConnection} -> pure entityConnection UserContactConnection {entityConnection} -> pure entityConnection deliveryStatus <- mapM readTVarIO . M.lookup acId =<< readTVarIO =<< asks agentDeliveryStatuses + networkStatus <- M.lookup acId <$> chatReadVar connNetworkStatuses pure $ CRDebugConnection DebugConnectionStatus { deliveryStatus, + networkStatus, inActive, inPending, server = (decodeLatin1 $ strEncode host, port), diff --git a/src/Simplex/Chat/Controller.hs b/src/Simplex/Chat/Controller.hs index 74e1dda0f6..d54ac52d48 100644 --- a/src/Simplex/Chat/Controller.hs +++ b/src/Simplex/Chat/Controller.hs @@ -777,6 +777,7 @@ data ChatResponse data DebugConnectionStatus = DebugConnectionStatus { deliveryStatus :: Maybe AgentDeliveryStatus, + networkStatus :: Maybe NetworkStatus, -- from agent's TRecvQ via rcvId inActive :: Bool, -- should the delivery work right now? inPending :: Bool, -- is there a temporary error? @@ -792,9 +793,6 @@ data DebugConnectionStatus = DebugConnectionStatus } deriving (Show) --- XXX: attach NetworkConfig ? --- TransportSessionMode ? - -- some of these can only be used as command responses allowRemoteEvent :: ChatResponse -> Bool allowRemoteEvent = \case