add description for all commands
[shpub.git] / src / shpub / Command / Reply.php
index 6b3bc94cd336238cd2479af242b304b847804103..61e4c59e986ea6e6b72a45197ebc8160f92c5fa6 100644 (file)
@@ -6,6 +6,8 @@ class Command_Reply extends Command_AbstractProps
     public static function opts(\Console_CommandLine $optParser)
     {
         $cmd = $optParser->addCommand('reply');
     public static function opts(\Console_CommandLine $optParser)
     {
         $cmd = $optParser->addCommand('reply');
+        $cmd->description = 'Create a reply';
+        static::addOptHtml($cmd);
         static::optsGeneric($cmd);
         $cmd->addArgument(
             'url',
         static::optsGeneric($cmd);
         $cmd->addArgument(
             'url',
@@ -18,7 +20,7 @@ class Command_Reply extends Command_AbstractProps
             'text',
             [
                 'optional'    => false,
             'text',
             [
                 'optional'    => false,
-                'multiple'    => true,
+                'multiple'    => false,
                 'description' => 'Reply text',
             ]
         );
                 'description' => 'Reply text',
             ]
         );
@@ -33,8 +35,8 @@ class Command_Reply extends Command_AbstractProps
 
         $req = new Request($this->cfg->host, $this->cfg);
         $req->setType('entry');
 
         $req = new Request($this->cfg->host, $this->cfg);
         $req->setType('entry');
-        $req->addProperty('content', implode(' ', $cmdRes->args['text']));
         $req->addProperty('in-reply-to', $url);
         $req->addProperty('in-reply-to', $url);
+        $req->addContent($cmdRes->args['text'], $cmdRes->options['html']);
 
         $this->handleGenericOptions($cmdRes, $req);
         $res = $req->send();
 
         $this->handleGenericOptions($cmdRes, $req);
         $res = $req->send();