shakespeare.diy 4fdd596cbc Stop opening duplicate WebSocket connections
The real problem: nostr.relay() and nostr.group() each open brand new
WebSocket connections outside the pool. Every hook that called these
was creating duplicate connections to relays the pool already had open.

Fixed by routing all queries and subscriptions through the pool (nostr)
directly, which reuses its internal connections:

- useStreamPosts: nostr.relay('wss://relay.ditto.pub') → nostr
- useStreamKind: nostr.relay('wss://relay.ditto.pub') → nostr
- useSearchProfiles: nostr.relay('wss://relay.ditto.pub') → nostr
- useFollowActions: nostr.group([...]) → nostr
- FollowPackDetailContent: nostr.group([...]) → nostr

Also reverted the hacky relay cleanup code in NostrProvider since
it was trying to solve the wrong problem.

Co-authored-by: shakespeare.diy <assistant@shakespeare.diy>
2026-02-18 00:11:28 -06:00
2026-02-16 16:54:01 -06:00
2026-02-16 16:54:01 -06:00
S
Description
Activist social network and fundraising platform on Nostr
AGPL-3.0 43 MiB
Languages
TypeScript 95.7%
Java 1.5%
JavaScript 0.9%
Swift 0.9%
CSS 0.5%
Other 0.4%