diff --git a/nostr/policies.go b/nostr/policies.go index 434ba98..a774e7e 100644 --- a/nostr/policies.go +++ b/nostr/policies.go @@ -14,15 +14,15 @@ 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 and seals - if event.Kind == 22242 || event.Kind == 13 { + // always allow seals, lightning ephemeral messages, auth messages + if event.Kind == 13 || event.Kind == 21000 || event.Kind == 22242 || event.Kind == 30078 { return false, "" } // ensure pubkey has authenticated authenticatedUser := khatru.GetAuthed(ctx) if authenticatedUser == "" { - l.Debug().Msgf("pubkey not authed: %s", event.PubKey) + l.Debug().Msgf("kind: %v, pubkey not authed: %s", event.Kind, event.PubKey) return true, fmt.Sprintf("auth-required: interacting with this relay requires authentication") }