From 246ef43e0b7ecb143a042d9909b1b85640d55bf9 Mon Sep 17 00:00:00 2001 From: joe Date: Sat, 15 Mar 2014 19:50:37 -0400 Subject: fixed probe-replies to include utmp presence --- xmppServer.hs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'xmppServer.hs') diff --git a/xmppServer.hs b/xmppServer.hs index efd790d0..ef71380b 100644 --- a/xmppServer.hs +++ b/xmppServer.hs @@ -604,8 +604,10 @@ answerProbe state mto k chan = do replies <- runTraversableT $ do cbu <- lift . atomically $ readTVar (clientsByUser state) - lpres <- liftMaybe $ Map.lookup u cbu - clientState <- liftT $ Map.elems (networkClients lpres) + let lpres = maybeToList $ Map.lookup u cbu + cw <- lift . atomically $ readTVar (cwClients $ consoleWriter state) + clientState <- liftT $ (lpres >>= Map.elems . networkClients) + ++ Map.elems cw stanza <- liftIOMaybe $ atomically (readTVar (clientStatus clientState)) stanza <- lift $ cloneStanza stanza let jid = unsplitJID (Just $ clientUser clientState -- cgit v1.2.3