From 5a44137ddea7b3a6d7f68cbe71594f7633d6e9a6 Mon Sep 17 00:00:00 2001 From: winter Date: Sun, 16 Feb 2025 19:36:51 +0000 Subject: link previews --- routes/note_fragment.php | 2 ++ 1 file changed, 2 insertions(+) (limited to 'routes/note_fragment.php') diff --git a/routes/note_fragment.php b/routes/note_fragment.php index b64eb22..e9a7396 100644 --- a/routes/note_fragment.php +++ b/routes/note_fragment.php @@ -89,6 +89,7 @@ Router::getInstance()->mount('/fragment/note/:id/reply', function (array $args) foreach (($_POST['mentions'] ?? []) as $uid) { $reply->mentions[] = Actor::find($uid); } + $reply->generateLinkPreviews(); $reply->save(); $reply->publish(); $reply->processTimelineAdditions(); @@ -126,6 +127,7 @@ Router::getInstance()->mount('/fragment/note', function (array $args) { $obj = StorageObject::findByOid($attachments[$i]); $note->attachments[] = NoteAttachment::fromStorageObject($obj, $index++, $altTexts[$i] ?: null); } + $note->generateLinkPreviews(); $note->save(); $note->publish(); $note->processTimelineAdditions(); -- cgit v1.3