1
0
mirror of https://github.com/wbbaddons/Tims-Chat.git synced 2024-10-31 14:10:08 +00:00

Allow retrieval of roomList even when not in Chat

This commit is contained in:
Tim Düsterhus 2014-01-08 15:59:09 +01:00
parent 0f049ba48a
commit 1a80743010

View File

@ -129,7 +129,6 @@ public function validateGetRoomList() {
if (!MODULE_CHAT) throw new exception\IllegalLinkException();
$this->parameters['room'] = RoomCache::getInstance()->getRoom(WCF::getUser()->chatRoomID);
if ($this->parameters['room'] === null) throw new exception\IllegalLinkException();
}
/**
@ -149,7 +148,7 @@ public function getRoomList() {
'object' => $room
)),
'roomID' => $room->roomID,
'active' => $room->roomID == $this->parameters['room']->roomID,
'active' => $this->parameters['room'] && $room->roomID == $this->parameters['room']->roomID,
'userCount' => count($room->getUsers())
);
}