X-Git-Url: https://git.cweiske.de/shpub.git/blobdiff_plain/f46e4d3108d944bcf86f5905780f1fcfd441c036..6c791f2d0c159d56c570802c8d9bd3612262aa9e:/src/shpub/Command/Reply.php diff --git a/src/shpub/Command/Reply.php b/src/shpub/Command/Reply.php index 493d587..61e4c59 100644 --- a/src/shpub/Command/Reply.php +++ b/src/shpub/Command/Reply.php @@ -6,6 +6,8 @@ class Command_Reply extends Command_AbstractProps 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', @@ -18,7 +20,7 @@ class Command_Reply extends Command_AbstractProps 'text', [ 'optional' => false, - 'multiple' => true, + 'multiple' => false, 'description' => 'Reply text', ] ); @@ -32,9 +34,9 @@ class Command_Reply extends Command_AbstractProps } $req = new Request($this->cfg->host, $this->cfg); - $req->req->addPostParameter('h', 'entry'); - $req->req->addPostParameter('content', implode(' ', $cmdRes->args['text'])); - $req->req->addPostParameter('in-reply-to', $url); + $req->setType('entry'); + $req->addProperty('in-reply-to', $url); + $req->addContent($cmdRes->args['text'], $cmdRes->options['html']); $this->handleGenericOptions($cmdRes, $req); $res = $req->send();