mirror of
https://activitypub.software/TransFem-org/Sharkey
synced 2024-11-29 17:33:02 +00:00
copy changes from createNote to updateNote
This commit is contained in:
parent
451b0ecc9b
commit
4e28004d0e
1 changed files with 7 additions and 9 deletions
|
@ -438,15 +438,13 @@ export class ApNoteService {
|
||||||
}
|
}
|
||||||
|
|
||||||
// 添付ファイル
|
// 添付ファイル
|
||||||
// TODO: attachmentは必ずしもImageではない
|
const files: MiDriveFile[] = [];
|
||||||
// TODO: attachmentは必ずしも配列ではない
|
|
||||||
const limit = promiseLimit<MiDriveFile>(2);
|
for (const attach of toArray(note.attachment)) {
|
||||||
const files = (await Promise.all(toArray(note.attachment).map(attach => (
|
attach.sensitive ??= note.sensitive;
|
||||||
limit(() => this.apImageService.resolveImage(actor, {
|
const file = await this.apImageService.resolveImage(actor, attach);
|
||||||
...attach,
|
if (file) files.push(file);
|
||||||
sensitive: note.sensitive, // Noteがsensitiveなら添付もsensitiveにする
|
}
|
||||||
}))
|
|
||||||
))));
|
|
||||||
|
|
||||||
// リプライ
|
// リプライ
|
||||||
const reply: MiNote | null = note.inReplyTo
|
const reply: MiNote | null = note.inReplyTo
|
||||||
|
|
Loading…
Reference in a new issue