mirror of
https://github.com/nbd-wtf/go-nostr.git
synced 2025-03-17 13:22:56 +01:00
a method for identifying nip70 "protected" events.
This commit is contained in:
parent
94e8b6790a
commit
99b11ea3be
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
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user