This commit is contained in:
syuilo 2025-10-06 20:01:19 +09:00
parent 6fba73ca13
commit fe38115883
1 changed files with 8 additions and 8 deletions

View File

@ -203,22 +203,22 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
) { ) {
super(meta, paramDef, async (ps, me) => { super(meta, paramDef, async (ps, me) => {
const draft = await this.noteDraftService.create(me, { const draft = await this.noteDraftService.create(me, {
fileIds: ps.fileIds, fileIds: ps.fileIds ?? [],
pollChoices: ps.poll?.choices ?? [], pollChoices: ps.poll?.choices ?? [],
pollMultiple: ps.poll?.multiple ?? false, pollMultiple: ps.poll?.multiple ?? false,
pollExpiresAt: ps.poll?.expiresAt ? new Date(ps.poll.expiresAt) : null, pollExpiresAt: ps.poll?.expiresAt ? new Date(ps.poll.expiresAt) : null,
pollExpiredAfter: ps.poll?.expiredAfter ?? null, pollExpiredAfter: ps.poll?.expiredAfter ?? null,
hasPoll: ps.poll != null, hasPoll: ps.poll != null,
text: ps.text, text: ps.text ?? null,
replyId: ps.replyId, replyId: ps.replyId ?? null,
renoteId: ps.renoteId, renoteId: ps.renoteId ?? null,
cw: ps.cw, cw: ps.cw ?? null,
hashtag: ps.hashtag, hashtag: ps.hashtag ?? null,
localOnly: ps.localOnly, localOnly: ps.localOnly,
reactionAcceptance: ps.reactionAcceptance, reactionAcceptance: ps.reactionAcceptance,
visibility: ps.visibility, visibility: ps.visibility,
visibleUserIds: ps.visibleUserIds, visibleUserIds: ps.visibleUserIds ?? [],
channelId: ps.channelId, channelId: ps.channelId ?? null,
scheduledAt: ps.scheduledAt ? new Date(ps.scheduledAt) : null, scheduledAt: ps.scheduledAt ? new Date(ps.scheduledAt) : null,
isActuallyScheduled: ps.isActuallyScheduled, isActuallyScheduled: ps.isActuallyScheduled,
}).catch((err) => { }).catch((err) => {