Hi all,

I've been working through Lance Halvorson's book and I got to a point where 
I was trying to test the ability to join a phoenix channel via JS code.  I 
kept getting back an error to the effect that it couldn't find the join/3 
function in the channel. The code he had was something like this:

def join("game:" <> game, _payload, socket) do
   {:ok, socket}
end

When I checked the Channel.join docs, I spotted that that second parameter 
is typespec'd as a map. I modified the parameter to %{} = _payload and sure 
enough everything worked as expected.

I then noticed that I was getting a compiler warning about join/3 not 
properly implementing the protocol.  

I'm sorry--I realize I'm being kind of vague. I just wanted to see if maybe 
that should be an _error_ not a warning.  Just wondering about opinions on 
this.

If my vagueness is too hard to follow for this conversation, I can dig up 
exact code and messages. :)


-- 
You received this message because you are subscribed to the Google Groups 
"elixir-lang-core" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to elixir-lang-core+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/elixir-lang-core/fbd90e4c-156b-43c1-a4be-096addad74e8%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to