From 7136735c14de20bd9813e0c8345934ffdb45f5d2 Mon Sep 17 00:00:00 2001 From: Gianni Ceccarelli Date: Tue, 3 Oct 2023 15:16:39 +0100 Subject: [PATCH] handle `{http://fedibird.com/ns#}quoteUri` on note edit my previous PR had missed this part of the code --- packages/backend/src/core/activitypub/models/ApNoteService.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/backend/src/core/activitypub/models/ApNoteService.ts b/packages/backend/src/core/activitypub/models/ApNoteService.ts index 261263842..5a8f90405 100644 --- a/packages/backend/src/core/activitypub/models/ApNoteService.ts +++ b/packages/backend/src/core/activitypub/models/ApNoteService.ts @@ -413,7 +413,7 @@ export class ApNoteService { // 引用 let quote: MiNote | undefined | null = null; - if (note._misskey_quote ?? note.quoteUrl) { + if (note._misskey_quote ?? note.quoteUrl ?? note.quoteUri) { const tryResolveNote = async (uri: string): Promise< | { status: 'ok'; res: MiNote } | { status: 'permerror' | 'temperror' } @@ -430,7 +430,7 @@ export class ApNoteService { } }; - const uris = unique([note._misskey_quote, note.quoteUrl].filter((x): x is string => typeof x === 'string')); + const uris = unique([note._misskey_quote, note.quoteUrl, note.quoteUri].filter((x): x is string => typeof x === 'string')); 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);