allow all to send zap receipts

This commit is contained in:
Amarpreet Minhas 2024-09-23 21:35:31 -04:00
parent f5ed963e73
commit fcce8eb980

View file

@ -16,11 +16,12 @@ func RejectUnregisteredNpubs(ctx context.Context, event *nostr.Event) (reject bo
// always allow the following kinds
// 13: nip-59 seals
// 9735: nip-57 zap receipt
// 21000: lightning.pub rpc
// 22242: nip-42 client auth
// 30078: nip-78 addressable events
switch event.Kind {
case 13, 21000, 22242, 30078:
case 13, 9735, 21000, 22242, 30078:
return false, ""
}
@ -38,10 +39,9 @@ func RejectUnregisteredNpubs(ctx context.Context, event *nostr.Event) (reject bo
// 4: nip-04 encrypted dms
// 14: nip-17 private dms
// 1059: nip-59 gift wraps
// 9735: nip-57 zap receipt
// 24133: nip-46 nostr connect
switch event.Kind {
case 4, 14, 1059, 9735, 24133:
case 4, 14, 1059, 24133:
for _, npub := range event.Tags.GetAll([]string{"p"}) {
npubs = append(npubs, npub.Value())
}