feat: add GET /relay/{id}/members endpoint
#6
Reference in New Issue
Block a user
Delete Branch "userAdityaa/zooid:relay-members-endpoint"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Description
Implemented
GET /relay/{id}/membersendpoint that returns the current member list for a relay by querying both live relay state and persisted configuration.Member Resolution: Two-Tier Approach
The endpoint resolves members using a priority-based strategy:
Tier 1: Live Relay (Real-time)
If the relay is currently running (loaded in instancesByName):
Tier 2: Config Fallback (Offline)
If relay is not loaded or not running:
Added due to: coracle/caravel#33, coracle/caravel#43
feat: add GET /relay/{id}/members endpointto feat: add `GET /relay/{id}/members` endpoint@@ -84,0 +166,4 @@memberSet[pubkey.Hex()] = struct{}{}}return sortedMembers(memberSet), nilInstead of doing this all manually, do some refactoring in lib.go so that we can
MakeInstanceand clean it up when we're done (if it's inactive). It's a little bit overkill, but instances shouldn't be terribly heavy.Done. Makes sense to eliminate the manual path entirely, this refactor removes all ad hoc member assembly and centralizes lifecycle management in a single place.
100c771d55to9ed0d72ca9