mirror of
https://github.com/fiatjaf/nak.git
synced 2025-12-10 01:28:49 +00:00
tags GetFirst() => Find()
This commit is contained in:
@@ -176,8 +176,8 @@ relayLoop:
|
|||||||
// beginhack
|
// beginhack
|
||||||
// here starts the biggest and ugliest hack of this codebase
|
// here starts the biggest and ugliest hack of this codebase
|
||||||
if err := relay.Auth(ctx, func(authEvent *nostr.Event) error {
|
if err := relay.Auth(ctx, func(authEvent *nostr.Event) error {
|
||||||
challengeTag := authEvent.Tags.GetFirst([]string{"challenge", ""})
|
challengeTag := authEvent.Tags.Find("challenge")
|
||||||
if (*challengeTag)[1] == "" {
|
if challengeTag[1] == "" {
|
||||||
return fmt.Errorf("auth not received yet *****")
|
return fmt.Errorf("auth not received yet *****")
|
||||||
}
|
}
|
||||||
return signer(ctx, nostr.RelayEvent{Event: authEvent, Relay: relay})
|
return signer(ctx, nostr.RelayEvent{Event: authEvent, Relay: relay})
|
||||||
|
|||||||
Reference in New Issue
Block a user