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':