diff options
author | James Crayne <jim.crayne@gmail.com> | 2017-10-31 21:43:18 +0000 |
---|---|---|
committer | James Crayne <jim.crayne@gmail.com> | 2017-10-31 21:43:18 +0000 |
commit | afc322ec9fdb230feac94cbf62300ccb79b9bb42 (patch) | |
tree | 82b29dbdf640b95729c63a557724d701fcf98581 /src/Network/Tox/Crypto | |
parent | e7543a3f661aad9310ca662f5e24b3f6083039a9 (diff) |
groupchat state variable
Diffstat (limited to 'src/Network/Tox/Crypto')
-rw-r--r-- | src/Network/Tox/Crypto/Handlers.hs | 2 |
1 files changed, 2 insertions, 0 deletions
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 | |||
18 | import Data.Serialize as S | 18 | import Data.Serialize as S |
19 | import Data.Word | 19 | import Data.Word |
20 | import GHC.Conc (unsafeIOToSTM) | 20 | import GHC.Conc (unsafeIOToSTM) |
21 | import qualified Data.Set as Set | ||
21 | 22 | ||
22 | -- util, todo: move to another module | 23 | -- util, todo: move to another module |
23 | maybeToEither :: Maybe b -> Either String b | 24 | maybeToEither :: Maybe b -> Either String b |
@@ -45,6 +46,7 @@ data NetCryptoSession = NCrypto { ncState :: TVar NetCryptoSessionStatus | |||
45 | , ncAllSessions :: NetCryptoSessions -- ^ may be needed if one net-crypto session | 46 | , ncAllSessions :: NetCryptoSessions -- ^ may be needed if one net-crypto session |
46 | -- needs to possibly start another, as is | 47 | -- needs to possibly start another, as is |
47 | -- the case in group chats | 48 | -- the case in group chats |
49 | , ncGroups :: TVar (Map.Map GroupChatId (Set.Set SockAddr)) | ||
48 | } | 50 | } |
49 | 51 | ||
50 | data NetCryptoSessions = NCSessions { netCryptoSessions :: TVar (Map.Map SockAddr NetCryptoSession) | 52 | data NetCryptoSessions = NCSessions { netCryptoSessions :: TVar (Map.Map SockAddr NetCryptoSession) |