Change some log messages.
parent
5ed167d8bb
commit
634b30bbf5
|
@ -234,7 +234,7 @@ handleQuery = case _ of
|
|||
pure (Just a)
|
||||
-- The authentication was a success!
|
||||
(AuthD.GotToken msg) -> do
|
||||
H.raise $ AppendMessage $ "[🎉] Authenticated!"
|
||||
H.raise $ AppendMessage $ "[🎉] Authenticated to authd!"
|
||||
H.raise $ AuthToken (Tuple msg.uid msg.token)
|
||||
pure (Just a)
|
||||
-- WTH?!
|
||||
|
|
|
@ -258,7 +258,7 @@ handleQuery = case _ of
|
|||
handleAction $ UpdateAcceptedDomains response.domains
|
||||
|
||||
(DNSManager.MkLogged response) -> do
|
||||
H.raise $ AppendMessage $ "[😈] Authenticated!"
|
||||
H.raise $ AppendMessage $ "[🎉] Authenticated to dnsmanagerd!"
|
||||
handleAction $ UpdateAcceptedDomains response.accepted_domains
|
||||
handleAction $ UpdateMyDomains response.my_domains
|
||||
|
||||
|
|
|
@ -112,7 +112,7 @@ handleAction action = do
|
|||
handleAction ConnectWebSocket
|
||||
|
||||
Finalize -> do
|
||||
H.raise $ AppendSystemMessage $ "Closing websocket for '" <> wsInfo.url <> "'"
|
||||
-- H.raise $ AppendSystemMessage $ "Closing websocket for '" <> wsInfo.url <> "'"
|
||||
case wsInfo.connection of
|
||||
Nothing -> H.raise $ AppendSystemMessage "No socket? How is that even possible?"
|
||||
Just socket -> H.liftEffect $ WS.close socket
|
||||
|
@ -121,7 +121,7 @@ handleAction action = do
|
|||
H.raise $ AppendSystemMessage $ renderError (UnknownError error)
|
||||
|
||||
ConnectWebSocket -> do
|
||||
H.raise $ AppendSystemMessage ("Connecting to \"" <> wsInfo.url <> "\"...")
|
||||
-- H.raise $ AppendSystemMessage $ "Connecting to \"" <> wsInfo.url <> "\"..."
|
||||
webSocket <- H.liftEffect $ WS.create wsInfo.url []
|
||||
H.liftEffect $ WS.setBinaryType webSocket ArrayBuffer
|
||||
H.modify_ _ { wsInfo { connection = Just webSocket } }
|
||||
|
@ -136,11 +136,11 @@ handleAction action = do
|
|||
HandleWebSocket wsEvent -> do
|
||||
case wsEvent of
|
||||
WebSocketMessage received_message -> do
|
||||
-- H.raise $ AppendMessage $ "[😈] Received a message"
|
||||
H.raise $ MessageReceived $ Tuple wsInfo.url received_message.message
|
||||
H.raise $ AppendMessage $ "[😈] Received a message"
|
||||
|
||||
WebSocketOpen -> do
|
||||
H.raise $ AppendSystemMessage ("Successfully connected to WebSocket at \"" <> wsInfo.url <> "\"!🎉")
|
||||
-- H.raise $ AppendSystemMessage ("Successfully connected to \"" <> wsInfo.url <> "\"!🎉")
|
||||
H.raise $ WSJustConnected
|
||||
|
||||
WebSocketClose { code, reason, wasClean } -> do
|
||||
|
@ -168,11 +168,7 @@ handleAction action = do
|
|||
baseCloseMessage =
|
||||
String.joinWith " "
|
||||
[ "Connection to WebSocket closed"
|
||||
, "[ CODE:"
|
||||
, show code
|
||||
, "|"
|
||||
, if wasClean then "CLEAN" else "DIRTY"
|
||||
, "]"
|
||||
, "[ CODE:" , show code , "|" , if wasClean then "CLEAN" else "DIRTY" , "]"
|
||||
]
|
||||
|
||||
handleQuery :: forall a m. MonadAff m => Query a -> H.HalogenM State Action () Output m (Maybe a)
|
||||
|
|
Loading…
Reference in New Issue