mirror of
https://github.com/wbbaddons/Tims-Chat.git
synced 2024-10-31 14:10:08 +00:00
Avoid problem with disabled join messages and no last messages.
This commit is contained in:
parent
92018b9a63
commit
382bbdba3c
@ -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();
|
||||||
|
Loading…
Reference in New Issue
Block a user