Skip to content

Commit

Permalink
Fix Channel debug message
Browse files Browse the repository at this point in the history
  • Loading branch information
saschatimme committed Nov 18, 2016
1 parent 7d12630 commit 0477a71
Showing 1 changed file with 22 additions and 5 deletions.
27 changes: 22 additions & 5 deletions src/Phoenix/Internal/Channel.elm
Original file line number Diff line number Diff line change
Expand Up @@ -109,15 +109,32 @@ insertState endpoint topic state dict =


updateState : State -> InternalChannel msg -> InternalChannel msg
updateState state { channel } =
if channel.debug then
updateState state internalChannel =
if internalChannel.channel.debug then
let
_ =
Debug.log ("Channel \"" ++ channel.topic ++ "\"") state
case ( state, internalChannel.state ) of
( Closed, Closed ) ->
state

( Joining, Joining ) ->
state

( Joined, Joined ) ->
state

( Errored, Errored ) ->
state

( Disconnected, Disconnected ) ->
state

_ ->
Debug.log ("Channel \"" ++ internalChannel.channel.topic ++ "\"") state
in
(InternalChannel state channel)
(InternalChannel state internalChannel.channel)
else
(InternalChannel state channel)
(InternalChannel state internalChannel.channel)


updatePayload : Maybe Value -> InternalChannel msg -> InternalChannel msg
Expand Down

0 comments on commit 0477a71

Please sign in to comment.