Compare commits

...

10 Commits

4 changed files with 240 additions and 686 deletions

View File

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

View File

@ -1692,19 +1692,16 @@ html[data-color-scheme=light] .preview {
.footerLeft {
flex: 1;
display: grid;
grid-auto-flow: row;
grid-template-columns: repeat(auto-fill, minmax(42px, 1fr));
grid-auto-rows: 40px;
display: flex;
height: 40px;
overflow: auto;
}
.footerRight {
flex: 0;
margin-left: auto;
display: grid;
grid-auto-flow: row;
grid-template-columns: repeat(auto-fill, minmax(42px, 1fr));
grid-auto-rows: 40px;
display: flex;
height: 40px;
direction: rtl;
}
@ -1714,6 +1711,7 @@ html[data-color-scheme=light] .preview {
margin: 0;
font-size: 1em;
width: auto;
min-width: 42px;
height: 100%;
border-radius: 6px;

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