1
0
mirror of https://github.com/wbbaddons/Tims-Chat.git synced 2025-01-10 00:30:09 +00:00

ME and WHISPER are parsed like normal messages

This commit is contained in:
Tim Düsterhus 2011-12-27 14:10:40 +01:00
parent bb50e76463
commit 0dcb2823c3

View File

@ -57,9 +57,12 @@ public function getFormattedMessage() {
$message = WCF::getLanguage()->get('wcf.chat.message.'.$this->type);
break;
case self::TYPE_NORMAL:
case self::TYPE_ME:
case self::TYPE_WHISPER:
if (!$this->enableHTML) {
$message = \wcf\system\bbcode\SimpleMessageParser::getInstance()->parse($message, true, $this->enableSmilies);
}
break;
}
return $message;
}
@ -84,7 +87,7 @@ 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');
if ($this->type == self::TYPE_ERROR) return WCF::getLanguage()->get('wcf.chat.error');
return $this->username;
}