summaryrefslogtreecommitdiff
path: root/src/Data/Tox/Msg.hs
diff options
context:
space:
mode:
Diffstat (limited to 'src/Data/Tox/Msg.hs')
-rw-r--r--src/Data/Tox/Msg.hs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/Data/Tox/Msg.hs b/src/Data/Tox/Msg.hs
index 6550fd95..66ec6eb1 100644
--- a/src/Data/Tox/Msg.hs
+++ b/src/Data/Tox/Msg.hs
@@ -288,7 +288,7 @@ instance Serialize Invite where
288 group_packet_id <- getWord8 -- expecting 254=GP_FRIEND_INVITE 288 group_packet_id <- getWord8 -- expecting 254=GP_FRIEND_INVITE
289 invite_type <- getWord8 289 invite_type <- getWord8
290 chatid <- get 290 chatid <- get
291 chatkey <- id2key <$> get 291 chatkey <- getPublicKey
292 Invite chatid chatkey <$> case invite_type of 292 Invite chatid chatkey <$> case invite_type of
293 0 -> do bs <- remaining >>= getBytes -- TODO: size can be determined from group shared state. 293 0 -> do bs <- remaining >>= getBytes -- TODO: size can be determined from group shared state.
294 return $ GroupInvite $ decodeUtf8 bs 294 return $ GroupInvite $ decodeUtf8 bs
@@ -302,7 +302,7 @@ instance Serialize Invite where
302 AcceptedInvite -> 1 -- GROUP_INVITE_ACCEPTED 302 AcceptedInvite -> 1 -- GROUP_INVITE_ACCEPTED
303 ConfirmedInvite {} -> 2 -- GROUP_INVITE_CONFIRMATION 303 ConfirmedInvite {} -> 2 -- GROUP_INVITE_CONFIRMATION
304 put $ inviteChatID x 304 put $ inviteChatID x
305 put $ key2id $ inviteChatKey x 305 putPublicKey $ inviteChatKey x
306 case invite x of 306 case invite x of
307 GroupInvite name -> putByteString $ encodeUtf8 name 307 GroupInvite name -> putByteString $ encodeUtf8 name
308 AcceptedInvite -> return () 308 AcceptedInvite -> return ()