1
0
forked from mirror/misskey

cleanup(ApNoteService.ts)

This commit is contained in:
okayurisotto 2023-07-03 06:12:33 +09:00
parent bfc22e9518
commit 42b90cd2f1

View File

@ -210,7 +210,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].filter((x): x is string => typeof x === 'string'));
const results = await Promise.all(uris.map(uri => tryResolveNote(uri))); const results = await Promise.all(uris.map(tryResolveNote));
quote = results.filter((x): x is { status: 'ok', res: Note } => x.status === 'ok').map(x => x.res).at(0); quote = results.filter((x): x is { status: 'ok', res: Note } => x.status === 'ok').map(x => x.res).at(0);
if (!quote) { if (!quote) {