$parameters['data']['username'] = WCF::getUser()->username;
// pre-parse message text
- $parameters['data']['message'] = MessageUtil::stripCrap($parameters['data']['message']);
- $parameters['data']['message'] = PreParser::getInstance()->parse($parameters['data']['message'], $this->allowedBBodes);
+ if ($parameters['data']['preParse']) {
+ $parameters['data']['message'] = PreParser::getInstance()->parse($parameters['data']['message'], $this->allowedBBodes);
+ }
+ unset($parameters['data']['preParse']);
+
+ $parameters['data'] = array_merge($additionalFields, $parameters['data']);
+
+ // attachment support
+ if (MODULE_ATTACHMENT && $object instanceof IAttachmentMessageQuickReplyAction) {
+ $parameters['attachmentHandler'] = $object->getAttachmentHandler($this->container);
+ }
$message = $object->create();
+ $eventParameters = array('message' => $message);
+ EventHandler::getInstance()->fireAction($this, 'createdMessage', $eventParameters);
+
if ($message instanceof IMessage && !$message->isVisible()) {
return array(
'isVisible' => false