upd: increase cw limit

Closes transfem-org/Sharkey#193
This commit is contained in:
Mar0xy 2023-12-03 17:56:54 +01:00
parent f639cc764c
commit ec5facd09a
No known key found for this signature in database
GPG key ID: 56569BBE47D2C828
3 changed files with 3 additions and 3 deletions

View file

@ -72,7 +72,7 @@ describe('api:notes/create', () => {
.toBe(INVALID); .toBe(INVALID);
}); });
test('over 100 characters cw', async () => { test('over 500 characters cw', async () => {
expect(v({ text: 'Body', cw: await tooLong })) expect(v({ text: 'Body', cw: await tooLong }))
.toBe(INVALID); .toBe(INVALID);
}); });

View file

@ -121,7 +121,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, maxLength: 100 }, cw: { type: 'string', nullable: true, minLength: 1, maxLength: 500 },
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

@ -139,7 +139,7 @@ export const paramDef = {
format: 'misskey:id', format: 'misskey:id',
}, },
}, },
cw: { type: 'string', nullable: true, minLength: 1, maxLength: 250 }, cw: { type: 'string', nullable: true, minLength: 1, maxLength: 500 },
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 },