Skip to content
This repository has been archived by the owner on Jun 4, 2018. It is now read-only.

channel_delete/(un)archive event passes the channel as id only #50

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/RealTimeClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -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':
Expand All @@ -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':
Expand Down