update to the fact that Pool doesn't use PoolOptions anymore, just modify the global pool directly.

This commit is contained in:
fiatjaf
2026-04-19 20:17:00 -03:00
parent 9ae5798a24
commit eae828e03b
9 changed files with 41 additions and 50 deletions

View File

@@ -152,13 +152,11 @@ example:
relayUrls = nostr.AppendUnique(relayUrls, targetRelays...)
relayUrls = nostr.AppendUnique(relayUrls, replyRelays...)
relayUrls = nostr.AppendUnique(relayUrls, c.Args().Slice()...)
relays := connectToAllRelays(ctx, c, relayUrls, nil,
nostr.PoolOptions{
AuthRequiredHandler: func(ctx context.Context, authEvent *nostr.Event) error {
return authSigner(ctx, c, func(s string, args ...any) {}, authEvent)
},
},
)
sys.Pool.AuthRequiredHandler = func(ctx context.Context, authEvent *nostr.Event) error {
return authSigner(ctx, c, func(s string, args ...any) {}, authEvent)
}
relays := connectToAllRelays(ctx, c, relayUrls, nil)
if len(relays) == 0 {
if len(relayUrls) == 0 {