more kinds
This commit is contained in:
parent
f559af7f27
commit
37cbe6c624
1 changed files with 3 additions and 3 deletions
|
@ -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")
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue