summaryrefslogtreecommitdiffstats
path: root/lib/Command
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
parentdb427031e5afd02f4118f9a60890a4487240b2e5 (diff)
parent33080573fc555fd0b3410ef03e33191f2c65a9fa (diff)
Merge pull request #1517 from nextcloud/enh/noid/statuses-creation
status creation from mastodon client
Diffstat (limited to 'lib/Command')
-rw-r--r--lib/Command/Fediverse.php4
-rw-r--r--lib/Command/MigrateAlpha3.php4
-rw-r--r--lib/Command/NoteCreate.php12
-rw-r--r--lib/Command/QueueStatus.php2
-rw-r--r--lib/Command/Timeline.php7
5 files changed, 16 insertions, 13 deletions
diff --git a/lib/Command/Fediverse.php b/lib/Command/Fediverse.php
index 0a9e7535..e2801bbd 100644
--- a/lib/Command/Fediverse.php
+++ b/lib/Command/Fediverse.php
@@ -58,8 +58,8 @@ class Fediverse extends Base {
parent::configure();
$this->setName('social:fediverse')
->addOption(
- 'type', 't', InputArgument::OPTIONAL,
- 'Change the type of access management', ''
+ 'type', 't', InputArgument::OPTIONAL,
+ 'Change the type of access management', ''
)
->addArgument('action', InputArgument::OPTIONAL, 'add/remove/test address', '')
->addArgument('address', InputArgument::OPTIONAL, 'address/host', '')
diff --git a/lib/Command/MigrateAlpha3.php b/lib/Command/MigrateAlpha3.php
index e8f9cbac..05774920 100644
--- a/lib/Command/MigrateAlpha3.php
+++ b/lib/Command/MigrateAlpha3.php
@@ -119,10 +119,10 @@ class MigrateAlpha3 extends Base {
$this->setName('social:migrate:alpha3')
->setDescription('Trying to migrate old data to Alpha3')
->addOption(
- 'remove-migrated-tables', '', InputOption::VALUE_NONE, 'Remove old table once copy is done'
+ 'remove-migrated-tables', '', InputOption::VALUE_NONE, 'Remove old table once copy is done'
)
->addOption(
- 'force-remove-old-tables', '', InputOption::VALUE_NONE, 'Force remove old tables'
+ 'force-remove-old-tables', '', InputOption::VALUE_NONE, 'Force remove old tables'
);
}
diff --git a/lib/Command/NoteCreate.php b/lib/Command/NoteCreate.php
index 2aed76e4..d5ea7827 100644
--- a/lib/Command/NoteCreate.php
+++ b/lib/Command/NoteCreate.php
@@ -96,18 +96,18 @@ class NoteCreate extends Base {
parent::configure();
$this->setName('social:note:create')
->addOption(
- 'replyTo', 'r', InputOption::VALUE_OPTIONAL, 'in reply to an existing thread'
+ 'replyTo', 'r', InputOption::VALUE_OPTIONAL, 'in reply to an existing thread'
)
->addOption(
- 'to', 't', InputOption::VALUE_OPTIONAL, 'mentioning people'
+ 'to', 't', InputOption::VALUE_OPTIONAL, 'mentioning people'
)
->addOption(
- 'type', 'y', InputOption::VALUE_OPTIONAL,
- 'type: public (default), followers, unlisted, direct'
+ 'type', 'y', InputOption::VALUE_OPTIONAL,
+ 'type: public (default), followers, unlisted, direct'
)
->addOption(
- 'hashtag', 'g', InputOption::VALUE_OPTIONAL,
- 'hashtag, without the leading #'
+ 'hashtag', 'g', InputOption::VALUE_OPTIONAL,
+ 'hashtag, without the leading #'
)
->addArgument('user_id', InputArgument::REQUIRED, 'userId of the author')
->addArgument('content', InputArgument::REQUIRED, 'content of the post')
diff --git a/lib/Command/QueueStatus.php b/lib/Command/QueueStatus.php
index 3de1e7ba..2e2bbbc3 100644
--- a/lib/Command/QueueStatus.php
+++ b/lib/Command/QueueStatus.php
@@ -73,7 +73,7 @@ class QueueStatus extends Base {
parent::configure();
$this->setName('social:queue:status')
->addOption(
- 'token', 't', InputOption::VALUE_OPTIONAL, 'token of a request'
+ 'token', 't', InputOption::VALUE_OPTIONAL, 'token of a request'
)
->setDescription('Return status on the request queue');
}
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);
}