feat: support more messaging kinds
This commit is contained in:
parent
54e3271c37
commit
69a9111aa0
1 changed files with 4 additions and 4 deletions
|
@ -14,8 +14,8 @@ func RejectUnregisteredNpubs(ctx context.Context, event *nostr.Event) (reject bo
|
||||||
var err error
|
var err error
|
||||||
l := gologger.Get(config.GetConfig().LogLevel).With().Str("context", "nostr-reject-unregistered").Logger()
|
l := gologger.Get(config.GetConfig().LogLevel).With().Str("context", "nostr-reject-unregistered").Logger()
|
||||||
|
|
||||||
// always allow auth messages
|
// always allow auth messages and seals
|
||||||
if event.Kind == 22242 {
|
if event.Kind == 22242 || event.Kind == 13 {
|
||||||
return false, ""
|
return false, ""
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -27,8 +27,8 @@ func RejectUnregisteredNpubs(ctx context.Context, event *nostr.Event) (reject bo
|
||||||
}
|
}
|
||||||
|
|
||||||
npubs := []string{authenticatedUser}
|
npubs := []string{authenticatedUser}
|
||||||
// add recipients to npubs list
|
// add recipients of dms (nip04)/private dms (nip17)/gift wraps (nip59) to npubs list
|
||||||
if event.Kind == 4 || event.Kind == 14 {
|
if event.Kind == 4 || event.Kind == 14 || event.Kind == 1059 {
|
||||||
for _, npub := range event.Tags.GetAll([]string{"p"}) {
|
for _, npub := range event.Tags.GetAll([]string{"p"}) {
|
||||||
npubs = append(npubs, npub.Value())
|
npubs = append(npubs, npub.Value())
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue