This commit is contained in:
syuilo
2018-09-05 19:32:46 +09:00
parent db943df0c8
commit a1b82e9723
43 changed files with 167 additions and 196 deletions

View File

@ -78,11 +78,11 @@ export async function createNote(value: any, resolver?: Resolver, silent = false
}
//#endergion
// 添付メディア
// 添付ファイル
// TODO: attachmentは必ずしもImageではない
// TODO: attachmentは必ずしも配列ではない
// Noteがsensitiveなら添付もsensitiveにする
const media = note.attachment
const files = note.attachment
.map(attach => attach.sensitive = note.sensitive)
? await Promise.all(note.attachment.map(x => resolveImage(actor, x)))
: [];
@ -100,7 +100,7 @@ export async function createNote(value: any, resolver?: Resolver, silent = false
return await post(actor, {
createdAt: new Date(note.published),
media,
files: files,
reply,
renote: undefined,
cw: note.summary,