mirror of
https://github.com/Cameri/nostream.git
synced 2025-03-18 05:41:49 +01:00
chore: remove schema limits for tag/content
Signed-off-by: Ricardo Arturo Cabral Mejía <me@ricardocabral.io>
This commit is contained in:
parent
205be2cf00
commit
85ac61cc93
@ -32,9 +32,8 @@ export const eventSchema = Schema.object({
|
||||
pubkey: pubkeySchema.required(),
|
||||
created_at: Schema.number().min(0).multiple(1).custom(seconds).required(),
|
||||
kind: kindSchema.required(),
|
||||
tags: Schema.array().items(tagSchema).max(500).required(),
|
||||
tags: Schema.array().items(tagSchema).required(),
|
||||
content: Schema.string()
|
||||
.max(64 * 1024) // 64 kB
|
||||
.allow('')
|
||||
.required(),
|
||||
sig: signatureSchema.required(),
|
||||
|
@ -97,7 +97,6 @@ describe('NIP-01', () => {
|
||||
],
|
||||
content: [
|
||||
{ message: 'must be a string', transform: assocPath(['content'], null) },
|
||||
{ message: 'length must be less than or equal to 65536 characters long', transform: assocPath(['content'], ' '.repeat(64 * 1024 + 1)) },
|
||||
{ message: 'is required', transform: omit(['content']) },
|
||||
],
|
||||
sig: [
|
||||
@ -112,7 +111,6 @@ describe('NIP-01', () => {
|
||||
tags: [
|
||||
{ message: 'must be an array', transform: assocPath(['tags'], null) },
|
||||
{ message: 'is required', transform: omit(['tags']) },
|
||||
{ message: 'must contain less than or equal to 500 items', transform: assocPath(['tags'], range(0, 501).map(() => (['x', 'x']))) },
|
||||
],
|
||||
tag: [
|
||||
{ message: 'must be an array', transform: assocPath(['tags', 0], null) },
|
||||
|
Loading…
x
Reference in New Issue
Block a user