diff --git a/src/routes/postSkipSegments.ts b/src/routes/postSkipSegments.ts index b911ca3..bca2062 100644 --- a/src/routes/postSkipSegments.ts +++ b/src/routes/postSkipSegments.ts @@ -227,11 +227,14 @@ async function checkInvalidFields(videoID: VideoID, userID: UserID, hashedUserID } if (typeof segmentPair.description !== "string" - || (segmentPair.actionType === ActionType.Chapter && segmentPair.description.length > 60 ) || (segmentPair.description.length !== 0 && segmentPair.actionType !== ActionType.Chapter)) { invalidFields.push("segment description"); } + if (segmentPair.actionType === ActionType.Chapter && segmentPair.description.length > 200) { + invalidFields.push("chapter name (too long)"); + } + const permission = await canSubmit(hashedUserID, segmentPair.category); if (!permission.canSubmit) { Logger.warn(`Rejecting submission due to lack of permissions for category ${segmentPair.category}: ${segmentPair.segment} ${hashedUserID} ${videoID} ${videoDurationParam} ${userAgent}`);