aboutsummaryrefslogtreecommitdiffhomepage
path: root/routes/note_fragment.php
diff options
context:
space:
mode:
Diffstat (limited to 'routes/note_fragment.php')
-rw-r--r--routes/note_fragment.php10
1 files changed, 7 insertions, 3 deletions
diff --git a/routes/note_fragment.php b/routes/note_fragment.php
index 76ef4b7..73702fe 100644
--- a/routes/note_fragment.php
+++ b/routes/note_fragment.php
@@ -99,11 +99,15 @@ Router::getInstance()->mount('/fragment/note/:id/reply', function (array $args)
$reply = Note::create(
$author->actor,
CommonMark::getInstance()->renderToPlainText($content),
- get_ui_language(), // TODO: actual language selector/detection
+ $_POST['language'] ?? $note->language,
$summary,
NotePrivacyScope::from($_POST['scope']),
(new UserSettings($author))->getBool('noteDefaults.indexable')
);
+ $interactors = NotePrivacyInteractors::from($_POST['interactors']);
+ $note->privacy->canReply = $interactors;
+ $note->privacy->canReshare = $interactors;
+ $note->privacy->canOtherInteract = $interactors;
$reply->formattedContent = [
'text/markdown' => $content,
'text/html' => CommonMark::getInstance()->renderToHtml($content)
@@ -173,7 +177,7 @@ Router::getInstance()->mount('/fragment/note', function (array $args) {
$note = Note::create(
$author->actor,
CommonMark::getInstance()->renderToPlainText($content),
- get_ui_language(), // TODO: actual language selector/detection
+ $_POST['language'] ?? get_ui_language(),
$summary,
NotePrivacyScope::from($_POST['scope']),
(new UserSettings($author))->getBool('noteDefaults.indexable')
@@ -241,4 +245,4 @@ Router::getInstance()->mount('/fragment/note/attachmentPill', function (array $a
'href' => $obj->getUrl()
]);
}
-}); \ No newline at end of file
+});