diff --git a/file/lib/data/chat/message/ChatMessage.class.php b/file/lib/data/chat/message/ChatMessage.class.php index b312815..f08fd7e 100644 --- a/file/lib/data/chat/message/ChatMessage.class.php +++ b/file/lib/data/chat/message/ChatMessage.class.php @@ -1,5 +1,6 @@ message; + return $this->getFormattedMessage; + } + + /** + * Returns the formatted message. + * + * @return string + */ + public function getFormattedMessage() { + $message = $this->message; + switch ($this->type) { + case self::TYPE_JOIN: + case self::TYPE_LEAVE: + case self::TYPE_BACK: + $message = WCF::getLanguage()->get('wcf.chat.message.'.$this->type); + } + return $message; } }