This commit is contained in:
syuilo 2025-09-25 13:58:11 +09:00
parent d4aa40bded
commit 2ab2081caa
2 changed files with 13 additions and 13 deletions

View File

@ -39,21 +39,21 @@ export class PostScheduledNoteProcessorService {
try { try {
const note = await this.noteCreateService.fetchAndCreate(draft.user, { const note = await this.noteCreateService.fetchAndCreate(draft.user, {
createdAt: new Date(), createdAt: new Date(),
files: files, fileIds: draft.fileIds,
poll: ps.poll ? { poll: ps.poll ? {
choices: ps.poll.choices, choices: ps.poll.choices,
multiple: ps.poll.multiple ?? false, multiple: ps.poll.multiple ?? false,
expiresAt: ps.poll.expiresAt ? new Date(ps.poll.expiresAt) : null, expiresAt: ps.poll.expiresAt ? new Date(ps.poll.expiresAt) : null,
} : undefined, } : undefined,
text: draft.text ?? undefined, text: draft.text ?? null,
reply, replyId: draft.replyId,
renote, renoteId: draft.renoteId,
cw: draft.cw, cw: draft.cw,
localOnly: draft.localOnly, localOnly: draft.localOnly,
reactionAcceptance: draft.reactionAcceptance, reactionAcceptance: draft.reactionAcceptance,
visibility: draft.visibility, visibility: draft.visibility,
visibleUsers, visibleUserIds: draft.visibleUserIds,
channel, channelId: draft.channelId,
apMentions: draft.noExtractMentions ? [] : undefined, apMentions: draft.noExtractMentions ? [] : undefined,
apHashtags: draft.noExtractHashtags ? [] : undefined, apHashtags: draft.noExtractHashtags ? [] : undefined,
apEmojis: draft.noExtractEmojis ? [] : undefined, apEmojis: draft.noExtractEmojis ? [] : undefined,

View File

@ -223,21 +223,21 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
try { try {
const note = await this.noteCreateService.fetchAndCreate(me, { const note = await this.noteCreateService.fetchAndCreate(me, {
createdAt: new Date(), createdAt: new Date(),
files: files, fileIds: ps.fileIds ?? ps.mediaIds ?? [],
poll: ps.poll ? { poll: ps.poll ? {
choices: ps.poll.choices, choices: ps.poll.choices,
multiple: ps.poll.multiple ?? false, multiple: ps.poll.multiple ?? false,
expiresAt: ps.poll.expiresAt ? new Date(ps.poll.expiresAt) : null, expiresAt: ps.poll.expiresAt ? new Date(ps.poll.expiresAt) : null,
} : undefined, } : undefined,
text: ps.text ?? undefined, text: ps.text ?? null,
reply, replyId: ps.replyId ?? null,
renote, renoteId: ps.renoteId ?? null,
cw: ps.cw, cw: ps.cw ?? null,
localOnly: ps.localOnly, localOnly: ps.localOnly,
reactionAcceptance: ps.reactionAcceptance, reactionAcceptance: ps.reactionAcceptance,
visibility: ps.visibility, visibility: ps.visibility,
visibleUsers, visibleUserIds: ps.visibleUserIds ?? [],
channel, channelId: ps.channelId ?? null,
apMentions: ps.noExtractMentions ? [] : undefined, apMentions: ps.noExtractMentions ? [] : undefined,
apHashtags: ps.noExtractHashtags ? [] : undefined, apHashtags: ps.noExtractHashtags ? [] : undefined,
apEmojis: ps.noExtractEmojis ? [] : undefined, apEmojis: ps.noExtractEmojis ? [] : undefined,