diff options
Diffstat (limited to 'xmppServer.hs')
-rw-r--r-- | xmppServer.hs | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/xmppServer.hs b/xmppServer.hs index 5487e532..3899a258 100644 --- a/xmppServer.hs +++ b/xmppServer.hs | |||
@@ -414,6 +414,7 @@ informClientPresence state k stanza = do | |||
414 | writeTVar (clientStatus cstate) $ Just dup | 414 | writeTVar (clientStatus cstate) $ Just dup |
415 | 415 | ||
416 | answerProbe state k stanza chan = do | 416 | answerProbe state k stanza chan = do |
417 | putStrLn $ "answerProbe! " ++ show (stanzaType stanza) | ||
417 | ktc <- atomically $ readTVar (keyToChan state) | 418 | ktc <- atomically $ readTVar (keyToChan state) |
418 | replies <- runTraversableT $ do | 419 | replies <- runTraversableT $ do |
419 | let liftMaybe = liftT . maybeToList | 420 | let liftMaybe = liftT . maybeToList |
@@ -427,8 +428,13 @@ answerProbe state k stanza chan = do | |||
427 | cbu <- lift . atomically $ readTVar (clientsByUser state) | 428 | cbu <- lift . atomically $ readTVar (clientsByUser state) |
428 | lpres <- liftMaybe $ Map.lookup u cbu | 429 | lpres <- liftMaybe $ Map.lookup u cbu |
429 | clientState <- liftT $ Map.elems (networkClients lpres) | 430 | clientState <- liftT $ Map.elems (networkClients lpres) |
430 | mstanza <- lift $ atomically (readTVar (clientStatus clientState)) | 431 | stanza <- liftIOMaybe $ atomically (readTVar (clientStatus clientState)) |
431 | liftMaybe mstanza | 432 | -- TODO: from address!! |
433 | let jid = unsplitJID (Just $ clientUser clientState | ||
434 | , ch | ||
435 | ,Just $ clientResource clientState) | ||
436 | ch = addrToText (auxAddr conn) | ||
437 | return stanza { stanzaFrom = Just jid } | ||
432 | forM_ replies $ \reply -> do | 438 | forM_ replies $ \reply -> do |
433 | sendModifiedStanzaToPeer reply chan | 439 | sendModifiedStanzaToPeer reply chan |
434 | -- TODO: if null replies, send offline message | 440 | -- TODO: if null replies, send offline message |