Hey guys, trying to wrap my head around PubSub communication within liveview.
Here’s example
@impl true
def mount(_params, _session, socket) do
if connected?(socket) do
MyappWeb.Endpoint.subscribe("updates-#{socket.assigns.current_user.id}")
end
{:ok, assign(socket, index_params: nil, current_page: :updates)}
end
And then somewhere in code I do
MyappWeb.Endpoint.broarcast(...)
Does that mean that web socket broadcast would be working only within server, so it won’t be visible on browser?