From 5610131fadb45479984da20143cbc87ce0b04a59 Mon Sep 17 00:00:00 2001 From: joe Date: Wed, 26 Jun 2013 15:45:16 -0400 Subject: comments --- Presence/XMPPServer.hs | 2 ++ Presence/main.hs | 9 +++++---- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/Presence/XMPPServer.hs b/Presence/XMPPServer.hs index 3413dcfb..54ee0975 100644 --- a/Presence/XMPPServer.hs +++ b/Presence/XMPPServer.hs @@ -769,5 +769,7 @@ seekRemotePeers config chan = do forM_ (Set.toList peers) $ \peer -> do when (is_remote peer) $ liftIO $ sendMessage server_connections (OutBoundPresence p) peer + -- TODO: send presence probes for buddies + -- TODO: cache remote presences for clients _ -> return (Just ()) loop diff --git a/Presence/main.hs b/Presence/main.hs index 5897d79e..08943b08 100644 --- a/Presence/main.hs +++ b/Presence/main.hs @@ -90,7 +90,7 @@ instance XMPPSession UnixSession where subscribe session Nothing = do let tmvar = localSubscriber (presence_state session) atomically $ subscribeToChan tmvar - subscribe session (Just jid) = do + subscribe session (Just jid) = do -- UNUSED as yet let tvar = subscriberMap (presence_state session) atomically $ subscribeToMap tvar jid announcePresence session (Presence jid status) = do @@ -149,11 +149,12 @@ update_presence locals_greedy subscribers state getStatus = type RefCount = Int data PresenceState = PresenceState - { hostname :: Peer -- ByteString + { hostname :: Peer -- ByteString, TODO: remove this, its always LocalHost now , currentTTY :: TVar ByteString , activeUsers :: TVar (Set JID) - , subscriberMap :: TVar (Map JID (RefCount,TChan Presence)) - , localSubscriber :: TMVar (RefCount,TChan Presence) + , subscriberMap :: TVar (Map JID (RefCount,TChan Presence)) -- UNUSED as yet + , localSubscriber :: TMVar (RefCount,TChan Presence) -- TODO: rename this, its not just locals + -- ... or make a separte channel for remotes } newPresenceState hostname = atomically $ do -- cgit v1.2.3