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:
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);
|
||||||
|
try {
|
||||||
\wcf\util\ChatUtil::writeUserData(array('lastSeen' => end($this->newestMessages)->messageID));
|
\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