From 3a3098f9320941196570ed0c14149eba50599add Mon Sep 17 00:00:00 2001 From: dakkar Date: Fri, 30 Aug 2024 16:12:02 +0100 Subject: [PATCH] fix filtering of quote uri MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit apparently filtering with `x => x !== null` will let `undefined` through… --- packages/backend/src/core/activitypub/models/ApNoteService.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/backend/src/core/activitypub/models/ApNoteService.ts b/packages/backend/src/core/activitypub/models/ApNoteService.ts index d97d17a23f..7b7a7921fb 100644 --- a/packages/backend/src/core/activitypub/models/ApNoteService.ts +++ b/packages/backend/src/core/activitypub/models/ApNoteService.ts @@ -483,7 +483,7 @@ export class ApNoteService { } }; - const uris = unique([note._misskey_quote, note.quoteUrl, note.quoteUri].filter(x => x !== null)); + const uris = unique([note._misskey_quote, note.quoteUrl, note.quoteUri].filter(x => x != null)); const results = await Promise.all(uris.map(tryResolveNote)); quote = results.filter((x): x is { status: 'ok', res: MiNote } => x.status === 'ok').map(x => x.res).at(0);