From 168a182d50beec11af420ea395fa1898172001db Mon Sep 17 00:00:00 2001 From: Yasuhiro Matsumoto Date: Thu, 4 Jun 2026 10:55:14 +0900 Subject: [PATCH] count: use Pool.AuthRequiredHandler to match other commands. --- count.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/count.go b/count.go index 190c34c..06f4da7 100644 --- a/count.go +++ b/count.go @@ -44,17 +44,17 @@ var count = &cli.Command{ forcePreAuthSigner = nil } - sys.Pool.RelayOptions.AuthHandler = func(ctx context.Context, _ *nostr.Relay, aevt *nostr.Event) error { + sys.Pool.AuthRequiredHandler = func(ctx context.Context, authEvent *nostr.Event) error { return authSigner(ctx, c, func(s string, args ...any) { if strings.HasPrefix(s, "authenticating as") { cleanUrl, _ := strings.CutPrefix( - nip42.GetRelayURLFromAuthEvent(*aevt), + nip42.GetRelayURLFromAuthEvent(*authEvent), "wss://", ) s = "authenticating to " + color.CyanString(cleanUrl) + " as" + s[len("authenticating as"):] } log(s+"\n", args...) - }, aevt) + }, authEvent) } relays := connectToAllRelays( ctx,