mirror of
https://github.com/Cameri/nostream.git
synced 2025-03-17 21:31:48 +01:00
feat: add content.maxLength setting
Signed-off-by: Ricardo Arturo Cabral Mejía <me@ricardocabral.io>
This commit is contained in:
parent
9928a0e4dc
commit
2089c9fd61
@ -43,11 +43,16 @@ export interface CreatedAtLimits {
|
||||
maxPositiveDelta?: number
|
||||
}
|
||||
|
||||
export interface ContentLimits {
|
||||
maxLength?: number
|
||||
}
|
||||
|
||||
export interface EventLimits {
|
||||
eventId?: EventIdLimits
|
||||
pubkey?: PubkeyLimits
|
||||
kind?: KindLimits
|
||||
createdAt?: CreatedAtLimits
|
||||
content?: ContentLimits
|
||||
rateLimits?: EventRateLimit[]
|
||||
}
|
||||
|
||||
|
@ -50,6 +50,9 @@ export class SettingsStatic {
|
||||
maxPositiveDelta: 900,
|
||||
maxNegativeDelta: 0, // disabled
|
||||
},
|
||||
content: {
|
||||
maxLength: 1048576,
|
||||
},
|
||||
rateLimits: [
|
||||
{
|
||||
kinds: [
|
||||
|
@ -72,6 +72,9 @@ describe('SettingsStatic', () => {
|
||||
maxPositiveDelta: 900, // +15 min
|
||||
maxNegativeDelta: 0, // disabled
|
||||
},
|
||||
content: {
|
||||
maxLength: 1048576,
|
||||
},
|
||||
'rateLimits': [
|
||||
{
|
||||
'kinds': [[0, 5], 7, [40, 49], [10000, 19999], [30000, 39999]],
|
||||
|
Loading…
x
Reference in New Issue
Block a user