diff --git a/README.md b/README.md index e0d552f..841bf46 100644 --- a/README.md +++ b/README.md @@ -73,7 +73,7 @@ func main() { policies.ValidateKind, // define your own policies - policies.PreventLargeTags(80), + policies.PreventLargeTags(100), func(ctx context.Context, event *nostr.Event) (reject bool, msg string) { if event.PubKey == "fa984bd7dbb282f07e16e7ae87b26a2a7b9b90b7246a44771f0cf5ae58018f52" { return true, "we don't allow this person to write here" diff --git a/docs/getting-started/index.md b/docs/getting-started/index.md index 88ec91d..f7c74f5 100644 --- a/docs/getting-started/index.md +++ b/docs/getting-started/index.md @@ -63,7 +63,7 @@ We can also make use of some default policies that come bundled with Khatru: ```go import "github.com/fiatjaf/khatru" // implied -relay.RejectEvent = append(relay.RejectEvent, policies.PreventLargeTags, policies.PreventTimestampsInThePast(time.Hour * 2), policies.PreventTimestampsInTheFuture(time.Minute * 30)) +relay.RejectEvent = append(relay.RejectEvent, policies.PreventLargeTags(120), policies.PreventTimestampsInThePast(time.Hour * 2), policies.PreventTimestampsInTheFuture(time.Minute * 30)) ``` There are many other ways to customize the relay behavior. Take a look at the [`Relay` struct docs](https://pkg.go.dev/github.com/fiatjaf/khatru#Relay) for more, or see the [cookbook](/cookbook/). diff --git a/examples/readme-demo/main.go b/examples/readme-demo/main.go index 1561956..5fdc0ee 100644 --- a/examples/readme-demo/main.go +++ b/examples/readme-demo/main.go @@ -58,7 +58,7 @@ func main() { policies.ValidateKind, // define your own policies - policies.PreventLargeTags(80), + policies.PreventLargeTags(100), func(ctx context.Context, event *nostr.Event) (reject bool, msg string) { if event.PubKey == "fa984bd7dbb282f07e16e7ae87b26a2a7b9b90b7246a44771f0cf5ae58018f52" { return true, "we don't allow this person to write here"