mirror of
https://github.com/nbd-wtf/go-nostr.git
synced 2025-06-22 14:51:55 +02:00
fixed panic when there is no "relay" tag
This commit is contained in:
parent
57683d4cae
commit
1e42994d7f
@ -48,7 +48,12 @@ func ValidateAuthEvent(event *nostr.Event, challenge string, relayURL string) (p
|
|||||||
return "", false
|
return "", false
|
||||||
}
|
}
|
||||||
|
|
||||||
found, err := parseURL(event.Tags.GetFirst([]string{"relay", ""}).Value())
|
tag := event.Tags.Find("relay")
|
||||||
|
if tag == nil {
|
||||||
|
return "", false
|
||||||
|
}
|
||||||
|
|
||||||
|
found, err := parseURL(tag[1])
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return "", false
|
return "", false
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user