summaryrefslogtreecommitdiff
path: root/Presence/XMPP.hs
diff options
context:
space:
mode:
Diffstat (limited to 'Presence/XMPP.hs')
-rw-r--r--Presence/XMPP.hs5
1 files changed, 5 insertions, 0 deletions
diff --git a/Presence/XMPP.hs b/Presence/XMPP.hs
index 6dbc64b0..2c01d456 100644
--- a/Presence/XMPP.hs
+++ b/Presence/XMPP.hs
@@ -610,8 +610,10 @@ handlePeer st src snk = do
610 610
611handlePeerPresence session stanza False = do 611handlePeerPresence session stanza False = do
612 -- Offline 612 -- Offline
613 liftIO . debugStr $ "PEER-OFFLINE: "++show stanza
613 withJust (lookupAttrib "from" (tagAttrs stanza)) $ \jid -> do 614 withJust (lookupAttrib "from" (tagAttrs stanza)) $ \jid -> do
614 peer_jid <- liftIO $ parseAddressJID (textToByteString jid) 615 peer_jid <- liftIO $ parseAddressJID (textToByteString jid)
616 liftIO . debugStr $ "PEER-OFFLINE-JID: "++show peer_jid
615 liftIO $ announcePresence session (Presence peer_jid Offline) 617 liftIO $ announcePresence session (Presence peer_jid Offline)
616handlePeerPresence session stanza True = do 618handlePeerPresence session stanza True = do
617 -- online (Available or Away) 619 -- online (Available or Away)
@@ -632,6 +634,7 @@ handlePeerPresence session stanza True = do
632 toStat "chat" = Available 634 toStat "chat" = Available
633 635
634 stat' <- parseChildren Available 636 stat' <- parseChildren Available
637 liftIO . debugStr $ "announcing peer online: "++show (pjid,stat')
635 liftIO $ announcePresence session (Presence pjid stat') 638 liftIO $ announcePresence session (Presence pjid stat')
636 log $ bshow (Presence pjid stat') 639 log $ bshow (Presence pjid stat')
637 640
@@ -683,6 +686,8 @@ handlePresenceProbe session stanza = do
683 when (peer sub == discardPort (peerAddress session)) $ do 686 when (peer sub == discardPort (peerAddress session)) $ do
684 ps <- userStatus session user 687 ps <- userStatus session user
685 -- todo: Consider making this a directed presence 688 -- todo: Consider making this a directed presence
689 forM_ ps $ \p -> do
690 debugStr ("PROBE-REPLY: "++show p)
686 mapM_ (sendPeerMessage session . OutBoundPresence) ps 691 mapM_ (sendPeerMessage session . OutBoundPresence) ps
687 return () 692 return ()
688 693