if (!$conversation->isDraft) {
// fire notification event
$notificationRecipients = array_merge((!empty($this->parameters['participants']) ? $this->parameters['participants'] : []), (!empty($this->parameters['invisibleParticipants']) ? $this->parameters['invisibleParticipants'] : []));
- UserNotificationHandler::getInstance()->fireEvent('conversation', 'com.woltlab.wcf.conversation.notification', new ConversationUserNotificationObject($conversation), $notificationRecipients);
+ UserNotificationHandler::getInstance()->fireEvent(
+ 'conversation',
+ 'com.woltlab.wcf.conversation.notification',
+ new ConversationUserNotificationObject($conversation),
+ $notificationRecipients
+ );
}
return $conversation;
UserStorageHandler::getInstance()->reset($newParticipantIDs, 'conversationCount');
// fire notification event
- UserNotificationHandler::getInstance()->fireEvent('conversation', 'com.woltlab.wcf.conversation.notification', new ConversationUserNotificationObject($conversation->getDecoratedObject()), $newParticipantIDs);
+ UserNotificationHandler::getInstance()->fireEvent(
+ 'conversation',
+ 'com.woltlab.wcf.conversation.notification',
+ new ConversationUserNotificationObject($conversation->getDecoratedObject()),
+ $newParticipantIDs
+ );
}
}
if (!$conversation->isDraft) {
$notificationRecipients = array_diff($conversation->getParticipantIDs(true), [$message->userID]); // don't notify message author
if (!empty($notificationRecipients)) {
- UserNotificationHandler::getInstance()->fireEvent('conversationMessage', 'com.woltlab.wcf.conversation.message.notification', new ConversationMessageUserNotificationObject($message), $notificationRecipients);
+ UserNotificationHandler::getInstance()->fireEvent(
+ 'conversationMessage',
+ 'com.woltlab.wcf.conversation.message.notification',
+ new ConversationMessageUserNotificationObject($message),
+ $notificationRecipients
+ );
}
}
UserStorageHandler::getInstance()->reset($conversation->getParticipantIDs(), 'unreadConversationCount');
// update search index
- SearchIndexManager::getInstance()->set('com.woltlab.wcf.conversation.message', $message->messageID, $message->message, (!empty($this->parameters['isFirstPost']) ? $conversation->subject : ''), $message->time, $message->userID, $message->username);
+ SearchIndexManager::getInstance()->set(
+ 'com.woltlab.wcf.conversation.message',
+ $message->messageID,
+ $message->message,
+ !empty($this->parameters['isFirstPost']) ? $conversation->subject : '',
+ $message->time,
+ $message->userID,
+ $message->username
+ );
// update attachments
if (isset($this->parameters['attachmentHandler']) && $this->parameters['attachmentHandler'] !== null) {
if (isset($this->parameters['data']) && isset($this->parameters['data']['message'])) {
foreach ($this->getObjects() as $message) {
$conversation = $message->getConversation();
- SearchIndexManager::getInstance()->set('com.woltlab.wcf.conversation.message', $message->messageID, $this->parameters['data']['message'], ($conversation->firstMessageID == $message->messageID ? $conversation->subject : ''), $message->time, $message->userID, $message->username);
+ SearchIndexManager::getInstance()->set(
+ 'com.woltlab.wcf.conversation.message',
+ $message->messageID,
+ $this->parameters['data']['message'],
+ $conversation->firstMessageID == $message->messageID ? $conversation->subject : '',
+ $message->time,
+ $message->userID,
+ $message->username
+ );
if (!empty($this->parameters['htmlInputProcessor'])) {
/** @noinspection PhpUndefinedMethodInspection */
);
if ($quoteID === false) {
- $removeQuoteID = MessageQuoteManager::getInstance()->getQuoteID('com.woltlab.wcf.conversation.message', $this->message->messageID, $this->message->getExcerpt(), $this->message->getMessage());
+ $removeQuoteID = MessageQuoteManager::getInstance()->getQuoteID(
+ 'com.woltlab.wcf.conversation.message',
+ $this->message->messageID,
+ $this->message->getExcerpt(),
+ $this->message->getMessage()
+ );
MessageQuoteManager::getInstance()->removeQuote($removeQuoteID);
}
* @inheritDoc
*/
public function saveQuote() {
- $quoteID = MessageQuoteManager::getInstance()->addQuote('com.woltlab.wcf.conversation.message', $this->message->conversationID, $this->message->messageID, $this->parameters['message'], false);
+ $quoteID = MessageQuoteManager::getInstance()->addQuote(
+ 'com.woltlab.wcf.conversation.message',
+ $this->message->conversationID,
+ $this->message->messageID,
+ $this->parameters['message'],
+ false
+ );
$returnValues = [
'count' => MessageQuoteManager::getInstance()->countQuotes(),