mirror of
https://activitypub.software/TransFem-org/Sharkey.git
synced 2024-12-13 21:40:45 +01:00
merge: handle fedibird quotes standard on edit (#48)
This commit is contained in:
commit
38b0d4a5f7
1 changed files with 2 additions and 2 deletions
|
@ -413,7 +413,7 @@ export class ApNoteService {
|
||||||
// 引用
|
// 引用
|
||||||
let quote: MiNote | undefined | null = null;
|
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<
|
const tryResolveNote = async (uri: string): Promise<
|
||||||
| { status: 'ok'; res: MiNote }
|
| { status: 'ok'; res: MiNote }
|
||||||
| { status: 'permerror' | 'temperror' }
|
| { 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));
|
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);
|
quote = results.filter((x): x is { status: 'ok', res: MiNote } => x.status === 'ok').map(x => x.res).at(0);
|
||||||
|
|
Loading…
Reference in a new issue