mirror of
https://github.com/nbd-wtf/go-nostr.git
synced 2025-07-09 15:49:56 +02:00
a method for identifying nip70 "protected" events.
This commit is contained in:
12
nip70/nip70.go
Normal file
12
nip70/nip70.go
Normal 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
|
||||
}
|
Reference in New Issue
Block a user