mirror of
https://github.com/wbbaddons/Tims-Chat.git
synced 2024-10-31 14:10:08 +00:00
Set new lastSeen-message
This commit is contained in:
parent
461be89d85
commit
a9f0cc86f5
@ -32,6 +32,10 @@ public function readData() {
|
||||
if (!$this->room->canEnter()) throw new \wcf\system\exception\PermissionDeniedException();
|
||||
|
||||
$this->messages = chat\message\ChatMessageList::getMessagesSince($this->room, \wcf\util\ChatUtil::readUserData('lastSeen'));
|
||||
$stmt = WCF::getDB()->prepareStatement("SELECT max(messageID) as messageID FROM wcf".WCF_N."_chat_message");
|
||||
$stmt->execute();
|
||||
$row = $stmt->fetchArray();
|
||||
\wcf\util\ChatUtil::writeUserData(array('lastSeen' => $row['messageID']));
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user