Compare commits

..

1 Commits

Author SHA1 Message Date
1Step621 4448f35175
Merge 12a0e1e433 into 74f33157a3 2025-10-06 17:16:22 +09:00
3 changed files with 678 additions and 234 deletions

View File

@ -192,7 +192,7 @@ export const paramDef = {
scheduledAt: { type: 'integer', nullable: true }, scheduledAt: { type: 'integer', nullable: true },
isActuallyScheduled: { type: 'boolean', default: false }, isActuallyScheduled: { type: 'boolean', default: false },
}, },
required: [], required: ['visibility', 'visibleUserIds', 'cw', 'hashtag', 'localOnly', 'reactionAcceptance', 'replyId', 'renoteId', 'channelId', 'text', 'fileIds', 'poll', 'scheduledAt', 'isActuallyScheduled'],
} as const; } as const;
@Injectable() @Injectable()
@ -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 ?? null, text: ps.text,
replyId: ps.replyId ?? null, replyId: ps.replyId,
renoteId: ps.renoteId ?? null, renoteId: ps.renoteId,
cw: ps.cw ?? null, cw: ps.cw,
hashtag: ps.hashtag ?? null, hashtag: ps.hashtag,
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 ?? null, channelId: ps.channelId,
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) => {

View File

@ -29205,34 +29205,34 @@ export interface operations {
* @default public * @default public
* @enum {string} * @enum {string}
*/ */
visibility?: 'public' | 'home' | 'followers' | 'specified'; visibility: 'public' | 'home' | 'followers' | 'specified';
visibleUserIds?: string[]; visibleUserIds: string[];
cw?: string | null; cw: string | null;
hashtag?: string | null; hashtag: string | null;
/** @default false */ /** @default false */
localOnly?: boolean; localOnly: boolean;
/** /**
* @default null * @default null
* @enum {string|null} * @enum {string|null}
*/ */
reactionAcceptance?: null | 'likeOnly' | 'likeOnlyForRemote' | 'nonSensitiveOnly' | 'nonSensitiveOnlyForLocalLikeOnlyForRemote'; reactionAcceptance: null | 'likeOnly' | 'likeOnlyForRemote' | 'nonSensitiveOnly' | 'nonSensitiveOnlyForLocalLikeOnlyForRemote';
/** Format: misskey:id */ /** Format: misskey:id */
replyId?: string | null; replyId: string | null;
/** Format: misskey:id */ /** Format: misskey:id */
renoteId?: string | null; renoteId: string | null;
/** Format: misskey:id */ /** Format: misskey:id */
channelId?: string | null; channelId: string | null;
text?: string | null; text: string | null;
fileIds?: string[]; fileIds: string[];
poll?: { poll: {
choices: string[]; choices: string[];
multiple?: boolean; multiple?: boolean;
expiresAt?: number | null; expiresAt?: number | null;
expiredAfter?: number | null; expiredAfter?: number | null;
} | null; } | null;
scheduledAt?: number | null; scheduledAt: number | null;
/** @default false */ /** @default false */
isActuallyScheduled?: boolean; isActuallyScheduled: boolean;
}; };
}; };
}; };

File diff suppressed because it is too large Load Diff