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

Moving lastSeen a bit around to see your join when inline-room-changing

This commit is contained in:
Tim Düsterhus 2012-01-14 12:53:18 +01:00
parent bedb5dcea5
commit 36592b0d9e

View File

@ -66,6 +66,8 @@ public function readData() {
$this->readRoom();
$this->userData['color'] = \wcf\util\ChatUtil::readUserData('color');
\wcf\util\ChatUtil::writeUserData(array('roomID' => $this->room->roomID));
$this->newestMessages = chat\message\ChatMessageList::getNewestMessages($this->room, CHAT_LASTMESSAGES);
\wcf\util\ChatUtil::writeUserData(array('lastSeen' => end($this->newestMessages)->messageID));
if (CHAT_DISPLAY_JOIN_LEAVE) {
$messageAction = new chat\message\ChatMessageAction(array(), 'create', array(
@ -82,14 +84,10 @@ public function readData() {
));
$messageAction->executeAction();
$return = $messageAction->getReturnValues();
\wcf\util\ChatUtil::writeUserData(array('lastSeen' => $return['returnValues'] -> messageID));
}
$this->readDefaultSmileys();
$this->readChatVersion();
$this->newestMessages = chat\message\ChatMessageList::getNewestMessages($this->room, CHAT_LASTMESSAGES);
}
/**