diff options
-rw-r--r-- | lib/Command/NoteBoost.php | 4 | ||||
-rw-r--r-- | lib/Controller/LocalController.php | 7 |
2 files changed, 7 insertions, 4 deletions
diff --git a/lib/Command/NoteBoost.php b/lib/Command/NoteBoost.php index ff9be421..942f95de 100644 --- a/lib/Command/NoteBoost.php +++ b/lib/Command/NoteBoost.php @@ -117,7 +117,7 @@ class NoteBoost extends Base { $this->setName('social:note:boost') ->addArgument('userid', InputArgument::REQUIRED, 'userId of the author') ->addArgument('note', InputArgument::REQUIRED, 'Note to boost') - ->addOption('unboost', '',InputOption::VALUE_NONE, 'Unboost') + ->addOption('unboost', '', InputOption::VALUE_NONE, 'Unboost') ->setDescription('Boost a note'); } @@ -138,7 +138,7 @@ class NoteBoost extends Base { if (!$input->getOption('unboost')) { $activity = $this->boostService->create($actor, $noteId, $token); } else { - $activity= $this->boostService->delete($actor, $noteId, $token); + $activity = $this->boostService->delete($actor, $noteId, $token); } echo 'object: ' . json_encode($activity, JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES) . "\n"; diff --git a/lib/Controller/LocalController.php b/lib/Controller/LocalController.php index d28cd49b..1098c2e8 100644 --- a/lib/Controller/LocalController.php +++ b/lib/Controller/LocalController.php @@ -161,7 +161,7 @@ class LocalController extends Controller { $post->setType($this->get('type', $data, Stream::TYPE_PUBLIC)); $post->setHashtags($this->getArray('hashtags', $data, [])); - /** @var ACore $activity */ + $token = ''; $activity = $this->postService->createPost($post, $token); return $this->success( @@ -214,6 +214,8 @@ class LocalController extends Controller { public function postBoost(string $postId): DataResponse { try { $this->initViewer(true); + + $token = ''; $announce = $this->boostService->create($this->viewer, $postId, $token); return $this->success( @@ -241,7 +243,8 @@ class LocalController extends Controller { try { $this->initViewer(true); - $token = $this->boostService->delete($this->viewer, $postId, $announce); + $token = ''; + $announce = $this->boostService->delete($this->viewer, $postId, $token); return $this->success( [ |