From 6123df0ebdc0c3eca63b1f4a943bd87dd1c4b53c Mon Sep 17 00:00:00 2001 From: Johann150 Date: Fri, 18 Oct 2024 17:39:28 +0200 Subject: [PATCH] server: catch unresolvable featured notes Instead of throwing all featured notes away, just remove that specific one. closes https://akkoma.dev/FoundKeyGang/FoundKey/issues/407 --- packages/backend/src/remote/activitypub/models/person.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/backend/src/remote/activitypub/models/person.ts b/packages/backend/src/remote/activitypub/models/person.ts index 689aeccd2..8fbbd9f41 100644 --- a/packages/backend/src/remote/activitypub/models/person.ts +++ b/packages/backend/src/remote/activitypub/models/person.ts @@ -464,7 +464,7 @@ async function updateFeatured(userId: User['id'], resolver: Resolver) { const featuredNotes = await Promise.all(items .filter(item => isPost(item)) .slice(0, 5) - .map(item => limit(() => resolveNote(item, resolver)))); + .map(item => limit(() => resolveNote(item, resolver).catch(() => null)))); await db.transaction(async transactionalEntityManager => { await transactionalEntityManager.delete(UserNotePining, { userId: user.id });