From bf0f5228182bd2dbf4b3280cbae8cbfb67b9c382 Mon Sep 17 00:00:00 2001 From: Julian Lam Date: Wed, 25 Feb 2026 12:38:34 -0500 Subject: [PATCH] feat: add a '[...]' to the end of the generated summary when federating out articles (fep-b2b8) --- src/activitypub/mocks.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/activitypub/mocks.js b/src/activitypub/mocks.js index 680bdf2e51..da9e6b0f97 100644 --- a/src/activitypub/mocks.js +++ b/src/activitypub/mocks.js @@ -759,7 +759,12 @@ Mocks.notes.public = async (post) => { // Append sentences to summary until it contains just under 500 characters of content const limit = 500; let remaining = limit; + let finished = false; summary = sentences.reduce((memo, sentence) => { + if (finished) { + return memo; + } + const clean = sanitize(sentence, { allowedTags: [], allowedAttributes: {}, @@ -767,6 +772,9 @@ Mocks.notes.public = async (post) => { remaining = remaining - clean.length; if (remaining > 0) { memo += ` ${sentence}`; + } else { // There was more but summary generation is complete + finished = true; + memo += ' [...]'; } return memo;