fix: add policy to reject kind 20001 events in event processing

This commit is contained in:
2026-01-23 00:10:15 +01:00
parent 0884e006b9
commit c01bcd5674

View File

@@ -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)