mirror of
https://github.com/layer-systems/relay.git
synced 2026-06-04 09:31:15 +02:00
fix: add policy to reject kind 20001 events in event processing
This commit is contained in:
6
main.go
6
main.go
@@ -102,6 +102,12 @@ func main() {
|
||||
policies.ValidateKind,
|
||||
policies.PreventTimestampsInThePast(600),
|
||||
policies.PreventTimestampsInTheFuture(60),
|
||||
func(ctx context.Context, event *nostr.Event) (reject bool, msg string) {
|
||||
if event.Kind == 20001 {
|
||||
return true, "kind 20001 events are not allowed"
|
||||
}
|
||||
return false, ""
|
||||
},
|
||||
)
|
||||
|
||||
policies.ApplySaneDefaults(relay)
|
||||
|
||||
Reference in New Issue
Block a user