Hi! Sorry to resurrect this. Is this solution still valid? I can’t get it to work. Do I need to set something else up? I believe I have a fairly default setup (see below) using the default generated @session_options in the endpoint. I have confirmed that the session_uuid sent to the genserver is correct. What can I be missing?
endpoint.ex
socket "/socket/session", MyApp.SessionSocket,
websocket: [connect_info: [session: @session_options]
socket.ex
use Phoenix.Socket
channel "lobby:*", MyApp.Channels.LobbyChannel, websocket: true, longpoll: false
lobby_channel.ex
use Phoenix.Channel
@impl true
def join("lobby:" <> session_uuid, _payload, socket) do
...
genServer.ex
use GenServer
def init(session_uuid) do
MyApp.Endpoint.subscribe("lobby:#{session_uuid}")
...
end
def handle_info(msg, state) do
IO.puts("This never gets called")
end






















