data['payload'] = @unserialize($this->data['payload']); if (!is_array($this->data['payload'])) { $this->data['payload'] = [ ]; } } /** * Returns whether this message already is inside the log. * * @return boolean */ public function isInLog() { return $this->time < (TIME_NOW - CHAT_ARCHIVE_AFTER); } /** * Returns the message type object of this message. * * @return \wcf\data\object\type\ObjectType */ public function getMessageType() { return \wcf\data\object\type\ObjectTypeCache::getInstance()->getObjectType($this->objectTypeID); } /** * Returns the chat room that contains this message. * * @return \chat\data\room\Room */ public function getRoom() { return \chat\data\room\RoomCache::getInstance()->getRoom($this->roomID); } }