debug
This commit is contained in:
parent
1a44dae580
commit
a7ce816dc6
|
@ -46,5 +46,5 @@ broadCastToClientsGeneric message = do
|
|||
|
||||
broadcast :: Text -> ConnectedClients -> IO ()
|
||||
broadcast message clients = do
|
||||
putStrLn message
|
||||
putStrLn $ "Broadcasting: " ++ message
|
||||
forM_ clients $ \client -> WS.sendTextData (conn client) message
|
||||
|
|
|
@ -54,13 +54,16 @@ roomStateDiffers newData = do
|
|||
not . eqIgnoreOrdering newData <$> getRoomDataState
|
||||
|
||||
roomStateDiffInOpenRooms ::
|
||||
( MonadRoomDataStateRead m
|
||||
( MonadRoomDataStateRead m,
|
||||
MonadIO m
|
||||
) =>
|
||||
RoomsData ->
|
||||
m (RoomsData, RoomsData)
|
||||
roomStateDiffInOpenRooms newData = do
|
||||
current <- getRoomDataState
|
||||
|
||||
liftIO $ putStrLn $ pack $ "Current rooms: " ++ show current
|
||||
liftIO $ putStrLn $ pack $ "New rooms: " ++ show newData
|
||||
let newRooms = filter roomNotEmpty $ filter (\newRoom -> isNothing $ find (sameName newRoom) current) newData
|
||||
let oldRooms = filter roomNotEmpty $ filter (\oldRoom -> isNothing $ find (sameName oldRoom) newData) current
|
||||
|
||||
|
|
Loading…
Reference in a new issue