Example #1
0
 /**
  * If replyable returns all comment reply command macros, otherwise a command macro to forward replies to
  * the post author.
  *
  * @since 2.0.0
  *
  * @param int                           $recipient_id
  * @param Prompt_Interface_Subscribable $subscribed_list
  * @return array
  */
 protected function mail_command_values($recipient_id, Prompt_Interface_Subscribable $subscribed_list)
 {
     $values = array();
     if ($this->replyable) {
         $command = new Prompt_New_Post_Comment_Command();
         $command->set_post_id($this->context->get_post()->id());
         $command->set_user_id($recipient_id);
         $values = Prompt_Command_Handling::get_comment_reply_macros($this->comments, $recipient_id);
     } else {
         $command = new Prompt_Forward_Command();
         $command->set_from_user_id($recipient_id);
         $command->set_to_user_id($this->context->get_post()->get_wp_post()->post_author);
         $command->set_subscription_object($subscribed_list);
     }
     $values['reply_to'] = $this->trackable_address(Prompt_Command_Handling::get_command_metadata($command));
     return $values;
 }