mirror of
https://codeberg.org/yeentown/barkey.git
synced 2025-07-07 12:36:57 +00:00
ignore empty CW with creating / editing notes
This commit is contained in:
parent
e44623d7c9
commit
908271c995
3 changed files with 3 additions and 3 deletions
|
@ -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', () => {
|
||||||
|
|
|
@ -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 },
|
||||||
|
|
|
@ -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 },
|
||||||
|
|
Loading…
Add table
Reference in a new issue