summaryrefslogtreecommitdiffstats
path: root/lib/Controller
diff options
context:
space:
mode:
authorMaxence Lange <maxence@artificial-owl.com>2018-11-13 17:05:58 -0100
committerMaxence Lange <maxence@artificial-owl.com>2018-11-13 17:05:58 -0100
commit0b08b1ed763f5f2371750f3b11810f8415e32689 (patch)
tree83e2f84211a14d3ef6ccbfdbee44670d6b9bbfa5 /lib/Controller
parent98ede2339764322e8da835afeda11589283455e6 (diff)
type can be public', 'direct', 'followers', 'unlisted'
Signed-off-by: Maxence Lange <maxence@artificial-owl.com>
Diffstat (limited to 'lib/Controller')
-rw-r--r--lib/Controller/ActivityPubController.php2
-rw-r--r--lib/Controller/LocalController.php1
2 files changed, 3 insertions, 0 deletions
diff --git a/lib/Controller/ActivityPubController.php b/lib/Controller/ActivityPubController.php
index 0c4bc52b..75dc25cb 100644
--- a/lib/Controller/ActivityPubController.php
+++ b/lib/Controller/ActivityPubController.php
@@ -186,6 +186,8 @@ class ActivityPubController extends Controller {
$this->activityService->checkRequest($this->request);
$body = file_get_contents('php://input');
+// $this->miscService->log('Body: ' . $body);
+
$activity = $this->importService->import($body);
try {
diff --git a/lib/Controller/LocalController.php b/lib/Controller/LocalController.php
index 4291e047..39193c2d 100644
--- a/lib/Controller/LocalController.php
+++ b/lib/Controller/LocalController.php
@@ -115,6 +115,7 @@ class LocalController extends Controller {
$post->setReplyTo($this->get('replyTo', $data, ''));
$post->setTo($this->getArray('to', $data, []));
$post->addTo($this->get('to', $data, ''));
+ $post->setType($this->get('type', $data, NoteService::TYPE_PUBLIC));
$result = $this->postService->createPost($post);