mirror of
https://github.com/Cameri/nostream.git
synced 2025-03-17 21:31:48 +01:00
chore: stricter rate limits
This commit is contained in:
parent
bb08f7637d
commit
2def1ae8ef
@ -23,6 +23,8 @@ export enum EventKinds {
|
||||
// Parameterized replaceable events
|
||||
PARAMETERIZED_REPLACEABLE_FIRST = 30000,
|
||||
PARAMETERIZED_REPLACEABLE_LAST = 39999,
|
||||
USER_APPLICATION_FIRST = 40000,
|
||||
USER_APPLICATION_LAST = Number.MAX_SAFE_INTEGER,
|
||||
}
|
||||
|
||||
export enum EventTags {
|
||||
|
@ -56,27 +56,62 @@ export class SettingsStatic {
|
||||
rateLimits: [
|
||||
{
|
||||
kinds: [
|
||||
[EventKinds.SET_METADATA, EventKinds.DELETE],
|
||||
EventKinds.REACTION,
|
||||
[EventKinds.CHANNEL_CREATION, EventKinds.CHANNEL_RESERVED_LAST],
|
||||
EventKinds.SET_METADATA,
|
||||
EventKinds.CONTACT_LIST,
|
||||
EventKinds.CHANNEL_CREATION,
|
||||
EventKinds.CHANNEL_METADATA,
|
||||
],
|
||||
period: 60000,
|
||||
rate: 6,
|
||||
},
|
||||
{
|
||||
kinds: [
|
||||
EventKinds.TEXT_NOTE,
|
||||
EventKinds.RECOMMEND_SERVER,
|
||||
EventKinds.ENCRYPTED_DIRECT_MESSAGE,
|
||||
EventKinds.CHANNEL_MESSAGE,
|
||||
],
|
||||
period: 60000,
|
||||
rate: 12,
|
||||
},
|
||||
{
|
||||
kinds: [
|
||||
EventKinds.TEXT_NOTE,
|
||||
EventKinds.RECOMMEND_SERVER,
|
||||
EventKinds.ENCRYPTED_DIRECT_MESSAGE,
|
||||
EventKinds.CHANNEL_MESSAGE,
|
||||
],
|
||||
period: 3600000,
|
||||
rate: 360,
|
||||
},
|
||||
{
|
||||
kinds: [
|
||||
[EventKinds.DELETE, EventKinds.REACTION],
|
||||
[EventKinds.CHANNEL_HIDE_MESSAGE, EventKinds.CHANNEL_RESERVED_LAST],
|
||||
],
|
||||
period: 60000,
|
||||
rate: 30,
|
||||
},
|
||||
{
|
||||
kinds: [
|
||||
[EventKinds.REPLACEABLE_FIRST, EventKinds.REPLACEABLE_LAST],
|
||||
[EventKinds.PARAMETERIZED_REPLACEABLE_FIRST, EventKinds.PARAMETERIZED_REPLACEABLE_LAST],
|
||||
],
|
||||
period: 60000,
|
||||
rate: 60,
|
||||
rate: 24,
|
||||
},
|
||||
{
|
||||
kinds: [[EventKinds.EPHEMERAL_FIRST, EventKinds.EPHEMERAL_LAST]],
|
||||
period: 60000,
|
||||
rate: 600,
|
||||
rate: 60,
|
||||
},
|
||||
{
|
||||
period: 3600000,
|
||||
rate: 3600,
|
||||
rate: 720,
|
||||
},
|
||||
{
|
||||
period: 86400000,
|
||||
rate: 86400,
|
||||
rate: 2880,
|
||||
},
|
||||
],
|
||||
},
|
||||
@ -90,7 +125,7 @@ export class SettingsStatic {
|
||||
rateLimits: [
|
||||
{
|
||||
period: 60000,
|
||||
rate: 600,
|
||||
rate: 120,
|
||||
},
|
||||
{
|
||||
period: 3600000,
|
||||
|
Loading…
x
Reference in New Issue
Block a user