feat: support multiple values for "image"

This commit is contained in:
Hazel Koehler 2024-05-03 00:45:12 -04:00
parent 4b24cce2c5
commit 13c69cb8ad
1 changed files with 4 additions and 3 deletions

View File

@ -443,11 +443,12 @@ export class ApNoteService {
// 添付ファイル
const attachments = toArray(note.attachment);
if (note.image)
attachments.push(note.image);
for (const image of toArray(note.image))
attachments.push(image);
const limit = promiseLimit<MiDriveFile>(2);
const filePromises = attachments
.filter(attach => toArray(attach.type)?.includes('Image'))
.filter(attach => toArray(attach.type).includes('Image'))
.map(attach => (
limit(() => this.apImageService.resolveImage(actor, {
...attach,