diff options
author | Jasper Van der Jeugt | 2020-08-04 20:20:12 +0200 |
---|---|---|
committer | Jasper Van der Jeugt | 2020-08-04 20:20:12 +0200 |
commit | 6034f1617392d09e3a5f9af19b064cc369f546e0 (patch) | |
tree | 98f726c9a18d36f24ba7745c409caf01e58736d5 /server | |
parent | a2e72144746fdecc0539286798c0a46a02e47d5f (diff) |
Make it look decent
Diffstat (limited to 'server')
-rw-r--r-- | server/lib/Cafp/Main/Server.hs | 1 | ||||
-rw-r--r-- | server/lib/Cafp/Messages.hs | 3 |
2 files changed, 2 insertions, 2 deletions
diff --git a/server/lib/Cafp/Main/Server.hs b/server/lib/Cafp/Main/Server.hs index 799f26e..4b1bfe7 100644 --- a/server/lib/Cafp/Main/Server.hs +++ b/server/lib/Cafp/Main/Server.hs @@ -142,6 +142,7 @@ wsApp server pc = case routePendingConnection pc of roomEmpty <- atomically $ leaveRoom room playerId if roomEmpty then deleteRoom server roomId else syncRoom room) (\playerId -> do + sink . Aeson.encode $ Welcome roomId syncRoom room cards <- fmap (^. gameCards) . atomically . STM.readTVar $ roomGame room diff --git a/server/lib/Cafp/Messages.hs b/server/lib/Cafp/Messages.hs index b572fb7..a02058f 100644 --- a/server/lib/Cafp/Messages.hs +++ b/server/lib/Cafp/Messages.hs @@ -62,10 +62,9 @@ data GameView = GameView } deriving (Show) data ServerMessage - = Welcome !Int + = Welcome !Text | SyncCards !Cards | SyncGameView !GameView - | Bye deriving (Show) data ClientMessage |