From a267c4c4753c6ac52cc6148d30e50f26ebef3421 Mon Sep 17 00:00:00 2001 From: Otto Rottier Date: Thu, 25 Jan 2018 13:02:31 +0100 Subject: [PATCH] channel_delete/(un)archive event passes the channel as id only not the entire channel object (id, name, ..) --- src/RealTimeClient.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/RealTimeClient.php b/src/RealTimeClient.php index be0480e..9f8f0a9 100644 --- a/src/RealTimeClient.php +++ b/src/RealTimeClient.php @@ -394,7 +394,7 @@ private function onMessage(WebSocketMessageInterface $message) break; case 'channel_deleted': - unset($this->channels[$payload['channel']['id']]); + unset($this->channels[$payload['channel']]); break; case 'channel_rename': @@ -403,11 +403,11 @@ private function onMessage(WebSocketMessageInterface $message) break; case 'channel_archive': - $this->channels[$payload['channel']['id']]->data['is_archived'] = true; + $this->channels[$payload['channel']]->data['is_archived'] = true; break; case 'channel_unarchive': - $this->channels[$payload['channel']['id']]->data['is_archived'] = false; + $this->channels[$payload['channel']]->data['is_archived'] = false; break; case 'group_joined':