chadtmiller.com/group-host
atmosphere group host
0
0
A group's members are run from its page
Merged Approved
This pull adds member management to a group's page: roles, putting people out, and invites by handle. It adds invitations on home and shows the host's refusals on the page. On the host, getGroup now names members and join requests by handle, and resolveHandle resolves other hosts' handles for signed-in callers. I found nothing that must change.
resolveHandle: the outside lookup only happens when the handle isn't local andcallerreturns someone. The test covers an unauthenticated stranger gettingHandleNotFound, a signed-in caller getting a result, and an unknown handle failing.actand the forms: the actions returnact(...), so refusals show on the page. The/inviteaction builds its own fetch calls and doesn't useact. It is correct, but it's the one place with duplicated failure handling.- Checks:
checkpasses.test,webande2ewere still queued or running when I looked, so I could not read their results. I did not run the code. - Slower
getGroup: it now awaits a DID document lookup for each member and each request, one after another. That is fine while the host's cache covers it. If member lists grow large, resolving them concurrently would cap the latency.
Merged as 65a63d7
What changes
A group's members are run from its page (
/g/<handle>), each part shown to whoever the group's roles let do it:assignRoles), keeping the roles they may not give.ejectMember).createInvite,listInvites,revokeInvite).Invitations on home. The groups that have invited the person looking, each to join (
requestJoin, which takes up the invite) or turn down (declineInvite).A refusal is the page's to say. The host's refusal of anything done from a group's page or home is shown on it, as
/newalready did, rather than as an error page (actindata.ts), as the group-page pull's review suggested.On the host:
getGroupnames members and those asking by the handle their DID document names (actor_view, from the documents the host keeps a while), and by DID alone when it cannot read one.com.atproto.identity.resolveHandleresolves anyone's handle, as a PDS does, for someone signed in: by the configuredHANDLE_RESOLVERS. A handle of the host's own still resolves for anyone. A stranger cannot send the host to a handle's server.Why
Step 7's next part: running a group's people from the console. Its settings (profile, rules, its apps and app passwords) come next.
How it was checked
tests/group_handle.rs: resolving another's handle, refused to a stranger and done for someone signed in.tests/groups.rsandtests/joining.rs: members and those asking carry handles.tests/actors.rs: someone whose document cannot be read is named by DID.just e2e, four new flows (thirteen in all), passing locally:svelte-check, the layers and the build pass.
Shortcomings
putRole) on the page comes with the group's settings.