summaryrefslogtreecommitdiff
path: root/src/Network/Tox/Crypto/Handlers.hs
diff options
context:
space:
mode:
Diffstat (limited to 'src/Network/Tox/Crypto/Handlers.hs')
-rw-r--r--src/Network/Tox/Crypto/Handlers.hs17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/Network/Tox/Crypto/Handlers.hs b/src/Network/Tox/Crypto/Handlers.hs
index fabbf21d..d8ba19eb 100644
--- a/src/Network/Tox/Crypto/Handlers.hs
+++ b/src/Network/Tox/Crypto/Handlers.hs
@@ -241,6 +241,23 @@ data ViewSnapshot = ViewSnapshot
241 , vGroups :: Map.Map GroupChatId (Set.Set SockAddr) 241 , vGroups :: Map.Map GroupChatId (Set.Set SockAddr)
242 } 242 }
243 243
244instance Serialize ViewSnapshot where
245 get = ViewSnapshot <$> get <*> get <*> get <*> get <*> get
246 <*> get <*> get <*> get <*> get <*> get <*> (pure Map.empty)
247 put (ViewSnapshot nick status statusmsg typing nospam
248 nick' status' statusmsg' typing' nospam' grps)
249 = do
250 put nick
251 put status
252 put statusmsg
253 put typing
254 put nospam
255 put nick'
256 put status'
257 put statusmsg'
258 put typing'
259 put nospam'
260
244-- | Take snapshot of SessionView 261-- | Take snapshot of SessionView
245-- 262--
246-- This is useful for storing the context of 263-- This is useful for storing the context of