return $returnValues;
}
- /**
- * @inheritDoc
- */
- public function validateJumpToExtended()
- {
- $this->readInteger('containerID');
- $this->readString('message', true);
- $this->readString('tmpHash', true);
-
- $this->conversation = new Conversation($this->parameters['containerID']);
- if (!$this->conversation->conversationID) {
- throw new UserInputException('containerID');
- } elseif (
- $this->conversation->isClosed
- || !Conversation::isParticipant([$this->conversation->conversationID])
- ) {
- throw new PermissionDeniedException();
- }
-
- // editing existing message
- if (isset($this->parameters['messageID'])) {
- $this->message = new ConversationMessage(\intval($this->parameters['messageID']));
- if (!$this->message->messageID || ($this->message->conversationID != $this->conversation->conversationID)) {
- throw new UserInputException('messageID');
- }
-
- if (!$this->message->canEdit()) {
- throw new PermissionDeniedException();
- }
- }
- }
-
- /**
- * @inheritDoc
- */
- public function jumpToExtended()
- {
- // quick reply
- if ($this->message === null) {
- QuickReplyManager::getInstance()
- ->setMessage('conversation', $this->conversation->conversationID, $this->parameters['message']);
- $url = LinkHandler::getInstance()->getLink(
- 'ConversationMessageAdd',
- ['id' => $this->conversation->conversationID]
- );
- } else {
- // editing message
- QuickReplyManager::getInstance()
- ->setMessage('conversationMessage', $this->message->messageID, $this->parameters['message']);
- $url = LinkHandler::getInstance()->getLink(
- 'ConversationMessageEdit',
- ['id' => $this->message->messageID]
- );
- }
-
- if (!empty($this->parameters['tmpHash'])) {
- QuickReplyManager::getInstance()->setTmpHash($this->parameters['tmpHash']);
- }
-
- // redirect
- return [
- 'url' => $url,
- ];
- }
-
/**
* @inheritDoc
*/