summaryrefslogtreecommitdiffstats
path: root/lib/Command/Timeline.php
diff options
context:
space:
mode:
authorMaxence Lange <maxence@artificial-owl.com>2022-11-22 16:28:06 -0100
committerGitHub <noreply@github.com>2022-11-22 16:28:06 -0100
commita21c75796fb49a20196153b71a11d48a77a555ca (patch)
tree72225cc1ba72975ec73a70b534377b159b4786de /lib/Command/Timeline.php
parentdb427031e5afd02f4118f9a60890a4487240b2e5 (diff)
parent33080573fc555fd0b3410ef03e33191f2c65a9fa (diff)
Merge pull request #1517 from nextcloud/enh/noid/statuses-creation
status creation from mastodon client
Diffstat (limited to 'lib/Command/Timeline.php')
-rw-r--r--lib/Command/Timeline.php7
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/Command/Timeline.php b/lib/Command/Timeline.php
index b85f91ab..433118c2 100644
--- a/lib/Command/Timeline.php
+++ b/lib/Command/Timeline.php
@@ -91,6 +91,7 @@ class Timeline extends ExtendedBase {
$this->setName('social:stream')
->addArgument('userId', InputArgument::REQUIRED, 'viewer')
->addArgument('timeline', InputArgument::REQUIRED, 'timeline')
+ ->addOption('local', '', InputOption::VALUE_NONE, 'public')
->addOption('count', '', InputOption::VALUE_REQUIRED, 'number of elements', '5')
->addOption('min_id', '', InputOption::VALUE_REQUIRED, 'min_id', 0)
->addOption('max_id', '', InputOption::VALUE_REQUIRED, 'max_id', 0)
@@ -133,10 +134,12 @@ class Timeline extends ExtendedBase {
->setMaxId(intval($input->getOption('max_id')));
try {
- $options->setTimeline($input->getArgument('timeline'));
+ if ($input->getOption('local')) {
+ $options->setLocal(true);
+ }
+ $options->setTimeline($timeline = $input->getArgument('timeline'));
$this->outputStreams($this->streamRequest->getTimeline($options));
} catch (UnknownTimelineException $e) {
- echo $input->getArgument('timeline');
$this->displayUnsupportedStream($options);
}