From 36592b0d9e17e2263a6bca1d4d76997b408953a6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim=20D=C3=BCsterhus?= Date: Sat, 14 Jan 2012 12:53:18 +0100 Subject: [PATCH] Moving lastSeen a bit around to see your join when inline-room-changing --- file/lib/page/ChatPage.class.php | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/file/lib/page/ChatPage.class.php b/file/lib/page/ChatPage.class.php index 53d2a5e..a9eb6ed 100644 --- a/file/lib/page/ChatPage.class.php +++ b/file/lib/page/ChatPage.class.php @@ -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); } /**