mirror of
https://github.com/wbbaddons/Tims-Chat.git
synced 2024-12-22 21:40:08 +00:00
Fixing problem with empty newestMessages
This commit is contained in:
parent
6e4fde3dd6
commit
4a9e1cb1e4
@ -67,7 +67,7 @@ public function readData() {
|
||||
$this->userData['color'] = \wcf\util\ChatUtil::readUserData('color');
|
||||
\wcf\util\ChatUtil::writeUserData(array('roomID' => $this->room->roomID));
|
||||
$this->newestMessages = chat\message\ChatMessageList::getNewestMessages($this->room, CHAT_LASTMESSAGES);
|
||||
\wcf\util\ChatUtil::writeUserData(array('lastSeen' => end($this->newestMessages)->messageID));
|
||||
\wcf\util\ChatUtil::writeUserData(array('lastSeen' => count($this->newestMessages) ? end($this->newestMessages)->messageID : 0));
|
||||
|
||||
if (CHAT_DISPLAY_JOIN_LEAVE) {
|
||||
$messageAction = new chat\message\ChatMessageAction(array(), 'create', array(
|
||||
|
Loading…
Reference in New Issue
Block a user