you’ll want to intercept the presence_diff message and add your conditional there as well…
https://hexdocs.pm/phoenix/Phoenix.Channel.html#intercept/1-examples
intercept ["presence_diff"]
def handle_out("presence_diff", msg, socket) do
if socket.assigns[:perms] |> Enum.member?("superuser"), do: push(socket, "presence_diff", msg)
{:noreply, socket}
end






















