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:
parent
bedb5dcea5
commit
36592b0d9e
@ -66,6 +66,8 @@ public function readData() {
|
|||||||
$this->readRoom();
|
$this->readRoom();
|
||||||
$this->userData['color'] = \wcf\util\ChatUtil::readUserData('color');
|
$this->userData['color'] = \wcf\util\ChatUtil::readUserData('color');
|
||||||
\wcf\util\ChatUtil::writeUserData(array('roomID' => $this->room->roomID));
|
\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) {
|
if (CHAT_DISPLAY_JOIN_LEAVE) {
|
||||||
$messageAction = new chat\message\ChatMessageAction(array(), 'create', array(
|
$messageAction = new chat\message\ChatMessageAction(array(), 'create', array(
|
||||||
@ -82,14 +84,10 @@ public function readData() {
|
|||||||
));
|
));
|
||||||
$messageAction->executeAction();
|
$messageAction->executeAction();
|
||||||
$return = $messageAction->getReturnValues();
|
$return = $messageAction->getReturnValues();
|
||||||
|
|
||||||
\wcf\util\ChatUtil::writeUserData(array('lastSeen' => $return['returnValues'] -> messageID));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->readDefaultSmileys();
|
$this->readDefaultSmileys();
|
||||||
$this->readChatVersion();
|
$this->readChatVersion();
|
||||||
|
|
||||||
$this->newestMessages = chat\message\ChatMessageList::getNewestMessages($this->room, CHAT_LASTMESSAGES);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
Reference in New Issue
Block a user