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

View File

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

File diff suppressed because it is too large Load Diff