diff --git a/file/lib/data/chat/message/ChatMessage.class.php b/file/lib/data/chat/message/ChatMessage.class.php index 544a5f0..1af64a8 100755 --- a/file/lib/data/chat/message/ChatMessage.class.php +++ b/file/lib/data/chat/message/ChatMessage.class.php @@ -72,7 +72,7 @@ public function getFormattedMessage() { public function getFormattedUsername() { $username = $this->getUsername(); - if ($this->type != self::TYPE_INFORMATION) $username = \wcf\util\ChatUtil::gradient($username, $this->color1, $this->color2); + if ($this->type != self::TYPE_INFORMATION && $this->type != self::TYPE_ERROR) $username = \wcf\util\ChatUtil::gradient($username, $this->color1, $this->color2); return ''.$username.''; } @@ -84,6 +84,8 @@ public function getFormattedUsername() { */ public function getUsername() { if ($this->type == self::TYPE_INFORMATION) return WCF::getLanguage()->get('wcf.chat.information'); + if ($this->type == self::ERROR) return WCF::getLanguage()->get('wcf.chat.error'); + return $this->username; }