I OpenPresenceChannel
This commit is contained in:
parent
c2341e01cf
commit
f6827015fa
|
|
@ -43,7 +43,12 @@ class OpenPresenceChannel extends Channel
|
||||||
$memberAddedPayload = [
|
$memberAddedPayload = [
|
||||||
'event' => 'presence.member_added',
|
'event' => 'presence.member_added',
|
||||||
'channel' => $this->getName(),
|
'channel' => $this->getName(),
|
||||||
'data' => $connection->socketId,
|
'data' => [
|
||||||
|
'socket' => $connection->socketId, // added socket
|
||||||
|
'count' => collect($connections)
|
||||||
|
->filter(fn($conn) => ($conn->remoteAddress && $conn->remoteAddress != '127.0.0.1'))
|
||||||
|
->count(),
|
||||||
|
],
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -79,6 +84,9 @@ class OpenPresenceChannel extends Channel
|
||||||
'channel' => $this->getName(),
|
'channel' => $this->getName(),
|
||||||
'data' => [
|
'data' => [
|
||||||
'socket' => $connection->socketId,
|
'socket' => $connection->socketId,
|
||||||
|
'count' => collect($connections)
|
||||||
|
->filter(fn($conn) => ($conn->remoteAddress && $conn->remoteAddress != '127.0.0.1'))
|
||||||
|
->count(),
|
||||||
],
|
],
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue