mirror of
https://github.com/Cameri/nostream.git
synced 2025-06-13 10:21:16 +02: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
|
maxPositiveDelta?: number
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export interface ContentLimits {
|
||||||
|
maxLength?: number
|
||||||
|
}
|
||||||
|
|
||||||
export interface EventLimits {
|
export interface EventLimits {
|
||||||
eventId?: EventIdLimits
|
eventId?: EventIdLimits
|
||||||
pubkey?: PubkeyLimits
|
pubkey?: PubkeyLimits
|
||||||
kind?: KindLimits
|
kind?: KindLimits
|
||||||
createdAt?: CreatedAtLimits
|
createdAt?: CreatedAtLimits
|
||||||
|
content?: ContentLimits
|
||||||
rateLimits?: EventRateLimit[]
|
rateLimits?: EventRateLimit[]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -50,6 +50,9 @@ export class SettingsStatic {
|
|||||||
maxPositiveDelta: 900,
|
maxPositiveDelta: 900,
|
||||||
maxNegativeDelta: 0, // disabled
|
maxNegativeDelta: 0, // disabled
|
||||||
},
|
},
|
||||||
|
content: {
|
||||||
|
maxLength: 1048576,
|
||||||
|
},
|
||||||
rateLimits: [
|
rateLimits: [
|
||||||
{
|
{
|
||||||
kinds: [
|
kinds: [
|
||||||
|
@ -72,6 +72,9 @@ describe('SettingsStatic', () => {
|
|||||||
maxPositiveDelta: 900, // +15 min
|
maxPositiveDelta: 900, // +15 min
|
||||||
maxNegativeDelta: 0, // disabled
|
maxNegativeDelta: 0, // disabled
|
||||||
},
|
},
|
||||||
|
content: {
|
||||||
|
maxLength: 1048576,
|
||||||
|
},
|
||||||
'rateLimits': [
|
'rateLimits': [
|
||||||
{
|
{
|
||||||
'kinds': [[0, 5], 7, [40, 49], [10000, 19999], [30000, 39999]],
|
'kinds': [[0, 5], 7, [40, 49], [10000, 19999], [30000, 39999]],
|
||||||
|
Loading…
x
Reference in New Issue
Block a user