diff --git a/nostr/policies.go b/nostr/policies.go index 8f5f651..434ba98 100644 --- a/nostr/policies.go +++ b/nostr/policies.go @@ -14,8 +14,8 @@ func RejectUnregisteredNpubs(ctx context.Context, event *nostr.Event) (reject bo var err error l := gologger.Get(config.GetConfig().LogLevel).With().Str("context", "nostr-reject-unregistered").Logger() - // always allow auth messages - if event.Kind == 22242 { + // always allow auth messages and seals + if event.Kind == 22242 || event.Kind == 13 { return false, "" } @@ -27,8 +27,8 @@ func RejectUnregisteredNpubs(ctx context.Context, event *nostr.Event) (reject bo } npubs := []string{authenticatedUser} - // add recipients to npubs list - if event.Kind == 4 || event.Kind == 14 { + // add recipients of dms (nip04)/private dms (nip17)/gift wraps (nip59) to npubs list + if event.Kind == 4 || event.Kind == 14 || event.Kind == 1059 { for _, npub := range event.Tags.GetAll([]string{"p"}) { npubs = append(npubs, npub.Value()) }