mirror of
https://github.com/nbd-wtf/go-nostr.git
synced 2025-06-29 10:09:35 +02:00
add nip14.GetSubject()
This commit is contained in:
12
nip14/subject.go
Normal file
12
nip14/subject.go
Normal file
@ -0,0 +1,12 @@
|
||||
package nip14
|
||||
|
||||
import "github.com/nbd-wtf/go-nostr"
|
||||
|
||||
func GetSubject(tags nostr.Tags) string {
|
||||
for _, tag := range tags {
|
||||
if len(tag) >= 2 && tag[0] == "subject" {
|
||||
return tag[1]
|
||||
}
|
||||
}
|
||||
return ""
|
||||
}
|
Reference in New Issue
Block a user