From afc322ec9fdb230feac94cbf62300ccb79b9bb42 Mon Sep 17 00:00:00 2001 From: James Crayne Date: Tue, 31 Oct 2017 21:43:18 +0000 Subject: groupchat state variable --- src/Network/Tox/Crypto/Handlers.hs | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/Network/Tox/Crypto/Handlers.hs') diff --git a/src/Network/Tox/Crypto/Handlers.hs b/src/Network/Tox/Crypto/Handlers.hs index 95ba7217..8a0e3fd9 100644 --- a/src/Network/Tox/Crypto/Handlers.hs +++ b/src/Network/Tox/Crypto/Handlers.hs @@ -18,6 +18,7 @@ import Data.Function import Data.Serialize as S import Data.Word import GHC.Conc (unsafeIOToSTM) +import qualified Data.Set as Set -- util, todo: move to another module maybeToEither :: Maybe b -> Either String b @@ -45,6 +46,7 @@ data NetCryptoSession = NCrypto { ncState :: TVar NetCryptoSessionStatus , ncAllSessions :: NetCryptoSessions -- ^ may be needed if one net-crypto session -- needs to possibly start another, as is -- the case in group chats + , ncGroups :: TVar (Map.Map GroupChatId (Set.Set SockAddr)) } data NetCryptoSessions = NCSessions { netCryptoSessions :: TVar (Map.Map SockAddr NetCryptoSession) -- cgit v1.2.3