1
0
mirror of https://github.com/wbbaddons/Tims-Chat.git synced 2024-12-22 21:40:08 +00:00

Avoid problem with disabled join messages and no last messages.

This commit is contained in:
Tim Düsterhus 2012-03-08 21:30:37 +01:00
parent 92018b9a63
commit 382bbdba3c

View File

@ -85,7 +85,12 @@ public function readData() {
} }
$this->newestMessages = chat\message\ChatMessageList::getNewestMessages($this->room, CHAT_LASTMESSAGES); $this->newestMessages = chat\message\ChatMessageList::getNewestMessages($this->room, CHAT_LASTMESSAGES);
\wcf\util\ChatUtil::writeUserData(array('lastSeen' => end($this->newestMessages)->messageID)); try {
\wcf\util\ChatUtil::writeUserData(array('lastSeen' => end($this->newestMessages)->messageID));
}
catch (SystemException $e) {
\wcf\util\ChatUtil::writeUserData(array('lastSeen' => 0));
}
$this->smilies = \wcf\data\smiley\SmileyCache::getInstance()->getCategorySmilies(); $this->smilies = \wcf\data\smiley\SmileyCache::getInstance()->getCategorySmilies();
$this->readChatVersion(); $this->readChatVersion();