summaryrefslogtreecommitdiff
path: root/Presence/main.hs
diff options
context:
space:
mode:
Diffstat (limited to 'Presence/main.hs')
-rw-r--r--Presence/main.hs9
1 files changed, 5 insertions, 4 deletions
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
90 subscribe session Nothing = do 90 subscribe session Nothing = do
91 let tmvar = localSubscriber (presence_state session) 91 let tmvar = localSubscriber (presence_state session)
92 atomically $ subscribeToChan tmvar 92 atomically $ subscribeToChan tmvar
93 subscribe session (Just jid) = do 93 subscribe session (Just jid) = do -- UNUSED as yet
94 let tvar = subscriberMap (presence_state session) 94 let tvar = subscriberMap (presence_state session)
95 atomically $ subscribeToMap tvar jid 95 atomically $ subscribeToMap tvar jid
96 announcePresence session (Presence jid status) = do 96 announcePresence session (Presence jid status) = do
@@ -149,11 +149,12 @@ update_presence locals_greedy subscribers state getStatus =
149type RefCount = Int 149type RefCount = Int
150 150
151data PresenceState = PresenceState 151data PresenceState = PresenceState
152 { hostname :: Peer -- ByteString 152 { hostname :: Peer -- ByteString, TODO: remove this, its always LocalHost now
153 , currentTTY :: TVar ByteString 153 , currentTTY :: TVar ByteString
154 , activeUsers :: TVar (Set JID) 154 , activeUsers :: TVar (Set JID)
155 , subscriberMap :: TVar (Map JID (RefCount,TChan Presence)) 155 , subscriberMap :: TVar (Map JID (RefCount,TChan Presence)) -- UNUSED as yet
156 , localSubscriber :: TMVar (RefCount,TChan Presence) 156 , localSubscriber :: TMVar (RefCount,TChan Presence) -- TODO: rename this, its not just locals
157 -- ... or make a separte channel for remotes
157 } 158 }
158 159
159newPresenceState hostname = atomically $ do 160newPresenceState hostname = atomically $ do