mirror of
https://github.com/nbd-wtf/go-nostr.git
synced 2025-06-16 11:51:08 +02:00
tags: fix out of range panic
This commit is contained in:
parent
97ed96ef73
commit
9e744e1eb0
2
tags.go
2
tags.go
@ -53,7 +53,7 @@ func (tag Tag) Value() string {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (tag Tag) Relay() string {
|
func (tag Tag) Relay() string {
|
||||||
if (tag[0] == "e" || tag[0] == "p") && len(tag) > 2 {
|
if len(tag) > 2 && (tag[0] == "e" || tag[0] == "p") {
|
||||||
return NormalizeURL(tag[2])
|
return NormalizeURL(tag[2])
|
||||||
}
|
}
|
||||||
return ""
|
return ""
|
||||||
|
Loading…
x
Reference in New Issue
Block a user