It does sound like the topic is not being set from the javascript side yeah.
Just for a quick recap, in case it helps in any way:
- The webpage initiates a websocket/longpolling connection to the server at a url.
- The server starts up a
Socket
to handle the connection, anything youassign
on the socket that you return here will be on the assign everywhere for this connection. - The javascript then connects to a topic.
- The server then gets the packet of the topic request and creates a new
Channel
process where the socket from the Socket is passed in here, it can further add ‘more’ assigns to the returned socket here, of which will be available to all the functions within the Channel. - Multiple channels can be joined and they can add/remove assigns to their copies of the main socket all they want with no interference.