go-nostr/nip14/subject.go

13 lines
204 B
Go
Raw Permalink Normal View History

2024-12-31 22:45:14 -03:00
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 ""
}