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. :)