From d9bf17761d6b770e8e56c642a8fa0f8e460a662f Mon Sep 17 00:00:00 2001 From: jade (winter) Date: Sat, 9 May 2026 15:50:43 +0100 Subject: add rudimentary language option and improve reply scope stuff --- routes/note_fragment.php | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'routes') 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 +}); -- cgit v1.3