Display custom node in ConstModule

Also wrote a short introductory node explaining node permissions.
This commit is contained in:
Joscha 2020-02-11 11:43:25 +00:00
parent 29e19ec1b2
commit 4c24430c07
5 changed files with 66 additions and 66 deletions

View file

@ -192,9 +192,9 @@ receiveUpdates eventChan node conn = handle (sendCloseEvent eventChan) $ do
packet <- receivePacket conn
case packet of
ServerUpdate path subnode -> do
let newNode = replaceAt subnode path node
writeBChan eventChan $ EventNode newNode
receiveUpdates eventChan newNode conn -- Aaand close the loop :D
let node' = replaceAt subnode path node
writeBChan eventChan $ EventNode node'
receiveUpdates eventChan node' conn -- Aaand close the loop :D
_ -> closeWithErrorMessage conn "Invalid packet: Expected update"
runCorrectClient :: ClientOptions -> WS.ClientApp a -> IO a