I got interception going on my channel:
`
intercept [“joined”, “left”]
def handle_out("joined", payload, socket) do
this_profile = socket.assigns[:profile]
that_profile = Dict.get(payload, "profile")
unless this_profile.id == that_profile["id"] do
npayload = Map.put(payload, :connection, 123)
push socket, "joined", npayload
end
{:noreply, socket}
end
`
when I run a test to verify my payload:
assert_broadcast "joined", msg, @default_assert_timeout Logger.debug "msg: #{inspect msg, pretty: true}"
the Logger output:
2016-07-22 09:16:42.830 [debug] msg: %{profile: %{“picture_url” => “http://test.com/2030346”, “zip” => nil}}
no connection field. Is assert_broadcast supposed to see message modified by the interceptor?