From 69a9111aa0e2f78d0f687a6a4c2dcad963218021 Mon Sep 17 00:00:00 2001 From: Asara Date: Sat, 17 Aug 2024 15:42:14 -0400 Subject: [PATCH] feat: support more messaging kinds --- nostr/policies.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) 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()) }