add restricted_writes.

This commit is contained in:
fiatjaf 2023-11-18 10:44:48 -03:00
parent cdedf15aa5
commit 30c99a035f
No known key found for this signature in database
GPG Key ID: BAD43C4BE5C1A3A1

View File

@ -11,6 +11,7 @@ import (
"github.com/fiatjaf/khatru/plugins"
"github.com/kelseyhightower/envconfig"
"github.com/nbd-wtf/go-nostr"
"github.com/nbd-wtf/go-nostr/nip11"
"github.com/rs/zerolog"
)
@ -54,6 +55,9 @@ func main() {
relay.Info.Description = s.RelayDescription
relay.Info.Contact = s.RelayContact
relay.Info.Icon = s.RelayIcon
relay.Info.Limitation = &nip11.RelayLimitationDocument{
RestrictedWrites: true,
}
relay.StoreEvent = append(relay.StoreEvent, db.SaveEvent)
relay.QueryEvents = append(relay.QueryEvents, db.QueryEvents)