mirror of
https://github.com/wbbaddons/Tims-Chat.git
synced 2024-10-31 14:10:08 +00:00
Reposition preparser
This commit is contained in:
parent
19e168c6a6
commit
64a7578ab1
@ -121,9 +121,10 @@ public function validateSend() {
|
||||
else {
|
||||
$this->parameters['type'] = Message::TYPE_NORMAL;
|
||||
$this->parameters['receiver'] = null;
|
||||
|
||||
$this->parameters['text'] = \wcf\system\bbcode\PreParser::getInstance()->parse($this->parameters['text'], explode(',', WCF::getSession()->getPermission('user.chat.allowedBBCodes')));
|
||||
|
||||
}
|
||||
|
||||
$this->parameters['text'] = \wcf\system\bbcode\PreParser::getInstance()->parse($this->parameters['text'], explode(',', WCF::getSession()->getPermission('user.chat.allowedBBCodes')));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -30,7 +30,9 @@ public function getType() {
|
||||
* @see \chat\system\command\ICommand::getMessage()
|
||||
*/
|
||||
public function getMessage() {
|
||||
return serialize(array('message' => $this->commandHandler->getParameters()));
|
||||
return serialize(array(
|
||||
'message' => \wcf\system\bbcode\PreParser::getInstance()->parse($this->commandHandler->getParameters(), explode(',', \wcf\system\WCF::getSession()->getPermission('user.chat.allowedBBCodes')))
|
||||
));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -24,7 +24,7 @@ public function getType() {
|
||||
* @see \chat\system\command\ICommand::getMessage()
|
||||
*/
|
||||
public function getMessage() {
|
||||
return \wcf\util\StringUtil::substring($this->commandHandler->getText(), 1);
|
||||
return \wcf\system\bbcode\PreParser::getInstance()->parse(\wcf\util\StringUtil::substring($this->commandHandler->getText(), 1), explode(',', \wcf\system\WCF::getSession()->getPermission('user.chat.allowedBBCodes')));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -43,6 +43,8 @@ public function getType() {
|
||||
* @see \chat\system\command\ICommand::getMessage()
|
||||
*/
|
||||
public function getMessage() {
|
||||
$this->message = \wcf\system\bbcode\PreParser::getInstance()->parse($this->message, explode(',', \wcf\system\WCF::getSession()->getPermission('user.chat.allowedBBCodes')));
|
||||
|
||||
return serialize(array('message' => $this->message, 'username' => $this->user->username));
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user