ignore empty CW with creating / editing notes

This commit is contained in:
Hazelnoot 2025-03-03 01:24:40 -05:00
parent e44623d7c9
commit 908271c995
3 changed files with 3 additions and 3 deletions

View file

@ -65,7 +65,7 @@ describe('api:notes/create', () => {
test('0 characters cw', () => { test('0 characters cw', () => {
expect(v({ text: 'Body', cw: '' })) expect(v({ text: 'Body', cw: '' }))
.toBe(INVALID); .toBe(VALID);
}); });
test('reject only cw', () => { test('reject only cw', () => {

View file

@ -159,7 +159,7 @@ export const paramDef = {
visibleUserIds: { type: 'array', uniqueItems: true, items: { visibleUserIds: { type: 'array', uniqueItems: true, items: {
type: 'string', format: 'misskey:id', type: 'string', format: 'misskey:id',
} }, } },
cw: { type: 'string', nullable: true, minLength: 1 }, cw: { type: 'string', nullable: true },
localOnly: { type: 'boolean', default: false }, localOnly: { type: 'boolean', default: false },
reactionAcceptance: { type: 'string', nullable: true, enum: [null, 'likeOnly', 'likeOnlyForRemote', 'nonSensitiveOnly', 'nonSensitiveOnlyForLocalLikeOnlyForRemote'], default: null }, reactionAcceptance: { type: 'string', nullable: true, enum: [null, 'likeOnly', 'likeOnlyForRemote', 'nonSensitiveOnly', 'nonSensitiveOnlyForLocalLikeOnlyForRemote'], default: null },
noExtractMentions: { type: 'boolean', default: false }, noExtractMentions: { type: 'boolean', default: false },

View file

@ -209,7 +209,7 @@ export const paramDef = {
format: 'misskey:id', format: 'misskey:id',
}, },
}, },
cw: { type: 'string', nullable: true, minLength: 1 }, cw: { type: 'string', nullable: true },
localOnly: { type: 'boolean', default: false }, localOnly: { type: 'boolean', default: false },
reactionAcceptance: { type: 'string', nullable: true, enum: [null, 'likeOnly', 'likeOnlyForRemote', 'nonSensitiveOnly', 'nonSensitiveOnlyForLocalLikeOnlyForRemote'], default: null }, reactionAcceptance: { type: 'string', nullable: true, enum: [null, 'likeOnly', 'likeOnlyForRemote', 'nonSensitiveOnly', 'nonSensitiveOnlyForLocalLikeOnlyForRemote'], default: null },
noExtractMentions: { type: 'boolean', default: false }, noExtractMentions: { type: 'boolean', default: false },