Skip to content
Snippets Groups Projects
Commit 4e28004d authored by dakkar's avatar dakkar
Browse files

copy changes from createNote to updateNote

parent 451b0ecc
No related branches found
No related tags found
4 merge requests!556release 2024.5.0,!554prepare for 2024.5, 2nd try,!552prepare for release 2024.5,!516merge from misskey: preparing for release 2024.5.0
......@@ -438,15 +438,13 @@ export class ApNoteService {
}
// 添付ファイル
// TODO: attachmentは必ずしもImageではない
// TODO: attachmentは必ずしも配列ではない
const limit = promiseLimit<MiDriveFile>(2);
const files = (await Promise.all(toArray(note.attachment).map(attach => (
limit(() => this.apImageService.resolveImage(actor, {
...attach,
sensitive: note.sensitive, // Noteがsensitiveなら添付もsensitiveにする
}))
))));
const files: MiDriveFile[] = [];
for (const attach of toArray(note.attachment)) {
attach.sensitive ??= note.sensitive;
const file = await this.apImageService.resolveImage(actor, attach);
if (file) files.push(file);
}
// リプライ
const reply: MiNote | null = note.inReplyTo
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment