From 6c5e898cd59e3fb2712217f4ce8498fc7e8dc9ce Mon Sep 17 00:00:00 2001 From: Evan Hines Date: Sat, 13 Dec 2025 14:00:07 -0500 Subject: [PATCH] Fix missing join_ref in PushMessage for Phoenix V2 protocol When pushing messages to a Phoenix channel, the V2 JSON serializer expects a join_ref to be included in the message array: [join_ref, ref, topic, event, payload] Without the join_ref, the server cannot properly route the message to the correct channel process, causing client->server messages to be silently dropped while server->client messages work fine. The fix adds join_ref from state.joins[topic], matching the pattern already used in the LeaveTopic handler. --- lib/slipstream/connection/pipeline.ex | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/slipstream/connection/pipeline.ex b/lib/slipstream/connection/pipeline.ex index 0dd8870..caa73e4 100644 --- a/lib/slipstream/connection/pipeline.ex +++ b/lib/slipstream/connection/pipeline.ex @@ -258,7 +258,8 @@ defmodule Slipstream.Connection.Pipeline do topic: cmd.topic, event: cmd.event, payload: cmd.payload, - ref: ref + ref: ref, + join_ref: state.joins[cmd.topic] }) case p do