mirror of
https://github.com/wbbaddons/Tims-Chat.git
synced 2024-12-22 21:40:08 +00:00
Allow retrieval of roomList even when not in Chat
This commit is contained in:
parent
0f049ba48a
commit
1a80743010
@ -129,7 +129,6 @@ public function validateGetRoomList() {
|
|||||||
if (!MODULE_CHAT) throw new exception\IllegalLinkException();
|
if (!MODULE_CHAT) throw new exception\IllegalLinkException();
|
||||||
|
|
||||||
$this->parameters['room'] = RoomCache::getInstance()->getRoom(WCF::getUser()->chatRoomID);
|
$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
|
'object' => $room
|
||||||
)),
|
)),
|
||||||
'roomID' => $room->roomID,
|
'roomID' => $room->roomID,
|
||||||
'active' => $room->roomID == $this->parameters['room']->roomID,
|
'active' => $this->parameters['room'] && $room->roomID == $this->parameters['room']->roomID,
|
||||||
'userCount' => count($room->getUsers())
|
'userCount' => count($room->getUsers())
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user