This repository was archived by the owner on Feb 7, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +7
-4
lines changed Expand file tree Collapse file tree 2 files changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -42,6 +42,6 @@ public function respond()
42
42
43
43
$ channel = $ this ->channelManager ->find ($ this ->connection ->app ->id , $ this ->payload ->channel );
44
44
45
- optional ($ channel )->broadcast ( $ this ->payload );
45
+ optional ($ channel )->broadcastToOthers ( $ this -> connection , $ this ->payload );
46
46
}
47
47
}
Original file line number Diff line number Diff line change @@ -39,7 +39,8 @@ public function client_messages_get_broadcasted_when_enabled()
39
39
],
40
40
]);
41
41
42
- $ connection = $ this ->getConnectedWebSocketConnection (['test-channel ' ]);
42
+ $ connection1 = $ this ->getConnectedWebSocketConnection (['test-channel ' ]);
43
+ $ connection2 = $ this ->getConnectedWebSocketConnection (['test-channel ' ]);
43
44
44
45
$ message = new Message (json_encode ([
45
46
'event ' => 'client-test ' ,
@@ -49,9 +50,11 @@ public function client_messages_get_broadcasted_when_enabled()
49
50
],
50
51
]));
51
52
52
- $ this ->pusherServer ->onMessage ($ connection , $ message );
53
+ $ this ->pusherServer ->onMessage ($ connection1 , $ message );
54
+
55
+ $ connection1 ->assertNotSentEvent ('client-test ' );
53
56
54
- $ connection ->assertSentEvent ('client-test ' , [
57
+ $ connection2 ->assertSentEvent ('client-test ' , [
55
58
'data ' => [
56
59
'client-event ' => 'test '
57
60
]
You can’t perform that action at this time.
0 commit comments