diff options
| author | winter | 2025-03-30 19:18:51 +0100 |
|---|---|---|
| committer | winter | 2025-03-30 19:18:51 +0100 |
| commit | b5ec7311ef03232099dd3f8b30298738e1d0937e (patch) | |
| tree | 2b880f4828c1b4aebc311c1accb84c9f8b3692ae /routes/note_fragment.php | |
| parent | cd10f94269d7dcdd93df9fcda142a1e5a4441ae9 (diff) | |
allow changing indexable setting
Diffstat (limited to 'routes/note_fragment.php')
| -rw-r--r-- | routes/note_fragment.php | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/routes/note_fragment.php b/routes/note_fragment.php index 3d3c658..ff9559c 100644 --- a/routes/note_fragment.php +++ b/routes/note_fragment.php @@ -11,13 +11,13 @@ use Digitigrade\Model\Note; use Digitigrade\Model\NoteAttachment; use Digitigrade\Model\NotePrivacyInteractors; use Digitigrade\Model\NotePrivacyScope; -use Digitigrade\Model\Notification; use Digitigrade\Model\StorageObject; use Digitigrade\Model\UserAccount; use Digitigrade\Notification\AdminEditedNoteNotif; use Digitigrade\PolicyManager; use Digitigrade\Router; use Digitigrade\StorageProvider\FilesystemStorage; +use Digitigrade\UserSettings; Router::getInstance()->mount('/fragment/note/:id', function (array $args) { $note = Note::find($args['id']); @@ -101,7 +101,8 @@ Router::getInstance()->mount('/fragment/note/:id/reply', function (array $args) CommonMark::getInstance()->renderToPlainText($content), get_ui_language(), // TODO: actual language selector/detection $summary, - NotePrivacyScope::from($_POST['scope']) + NotePrivacyScope::from($_POST['scope']), + (new UserSettings($author))->getBool('noteDefaults.indexable') ); $reply->formattedContent = [ 'text/markdown' => $content, @@ -171,7 +172,8 @@ Router::getInstance()->mount('/fragment/note', function (array $args) { CommonMark::getInstance()->renderToPlainText($content), get_ui_language(), // TODO: actual language selector/detection $summary, - NotePrivacyScope::from($_POST['scope']) + NotePrivacyScope::from($_POST['scope']), + (new UserSettings($author))->getBool('noteDefaults.indexable') ); $interactors = NotePrivacyInteractors::from($_POST['interactors']); $note->privacy->canReply = $interactors; |
