diff options
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 |