diff --git a/file/lib/form/ChatForm.class.php b/file/lib/form/ChatForm.class.php index a3b77a5..2e71210 100644 --- a/file/lib/form/ChatForm.class.php +++ b/file/lib/form/ChatForm.class.php @@ -217,9 +217,10 @@ public function save() { ) )); $this->objectAction->executeAction(); + $returnValues = $this->objectAction->getReturnValues(); // add activity points - \wcf\system\user\activity\point\UserActivityPointHandler::getInstance()->fireEvent('be.bastelstu.chat.activityPointEvent.message', TIME_NOW, WCF::getUser()->userID); + \wcf\system\user\activity\point\UserActivityPointHandler::getInstance()->fireEvent('be.bastelstu.chat.activityPointEvent.message', $returnValues->messageID, WCF::getUser()->userID); $this->saved(); } diff --git a/file/lib/page/ChatPage.class.php b/file/lib/page/ChatPage.class.php index a4a50d2..aeecc49 100644 --- a/file/lib/page/ChatPage.class.php +++ b/file/lib/page/ChatPage.class.php @@ -208,7 +208,7 @@ public function show() { parent::show(); // add activity points - \wcf\system\user\activity\point\UserActivityPointHandler::getInstance()->fireEvent('be.bastelstu.chat.activityPointEvent.join', TIME_NOW, WCF::getUser()->userID); + \wcf\system\user\activity\point\UserActivityPointHandler::getInstance()->fireEvent('be.bastelstu.chat.activityPointEvent.join', (microtime(true) * 1000 & 0xFFFFFFFF), WCF::getUser()->userID); // break if not using ajax if ($this->useTemplate) exit;