This commit is contained in:
Marcel Pociot 2018-12-03 22:11:44 +01:00
parent 13dc4bda67
commit 533f8a53ba
2 changed files with 6 additions and 2 deletions

View File

@ -102,7 +102,7 @@
methods: { methods: {
connect() { connect() {
this.pusher = new Pusher(this.app.appKey, { this.pusher = new Pusher(this.app.key, {
wsHost: window.location.hostname, wsHost: window.location.hostname,
wsPort: this.port, wsPort: this.port,
disableStats: true, disableStats: true,
@ -148,7 +148,7 @@
}, },
subscribeToChannel(channel) { subscribeToChannel(channel) {
this.pusher.subscribe('{{ \BeyondCode\LaravelWebSockets\LaravelEcho\Pusher\Dashboard::LOG_CHANNEL_PREFIX }}' + channel) this.pusher.subscribe('{{ \BeyondCode\LaravelWebSockets\Dashboard\DashboardLogger::LOG_CHANNEL_PREFIX }}' + channel)
.bind('log-message', (data) => { .bind('log-message', (data) => {
this.logs.push(data); this.logs.push(data);
}); });

View File

@ -44,6 +44,10 @@ class PresenceChannel extends Channel
{ {
parent::unsubscribe($connection); parent::unsubscribe($connection);
if (! isset($this->users[$connection->socketId])) {
return;
}
$this->broadcastToOthers($connection, [ $this->broadcastToOthers($connection, [
'event' => 'pusher_internal:member_removed', 'event' => 'pusher_internal:member_removed',
'channel' => $this->channelName, 'channel' => $this->channelName,