mirror of
https://github.com/wbbaddons/Tims-Chat.git
synced 2025-01-09 00:20:08 +00:00
Optimize ChatMessagePage
This commit is contained in:
parent
8e07b7f2b7
commit
2f6354acdb
@ -116,15 +116,14 @@ public function readMessages() {
|
||||
|
||||
// update last seen message
|
||||
$sql = "SELECT
|
||||
MAX(messageID) as messageID
|
||||
MAX(messageID)
|
||||
FROM
|
||||
wcf".WCF_N."_chat_message";
|
||||
$stmt = WCF::getDB()->prepareStatement($sql);
|
||||
$stmt->execute();
|
||||
$row = $stmt->fetchArray();
|
||||
|
||||
\wcf\util\ChatUtil::writeUserData(array(
|
||||
'lastSeen' => $row['messageID'],
|
||||
'lastSeen' => $stmt->fetchColumn(),
|
||||
'lastActivity' => TIME_NOW
|
||||
));
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user