a method for identifying nip70 "protected" events.

This commit is contained in:
fiatjaf 2025-03-10 02:26:20 -03:00
parent 94e8b6790a
commit 99b11ea3be

12
nip70/nip70.go Normal file
View File

@ -0,0 +1,12 @@
package nip70
import "github.com/nbd-wtf/go-nostr"
func IsProtected(event *nostr.Event) bool {
for _, tag := range event.Tags {
if len(tag) == 1 && tag[0] == "-" {
return true
}
}
return false
}