~ knotless Search/
↑↓ move↵ open⇧↵ all results
0
0

A person is named, to someone signed in, if the host shows them

Merged
Merged chadtmiller.com asked to merge into main from chadtmiller.com/group-host:host/get-actor

What changes

getActor names a person to someone signed in (actors.rs, docs/design/groups.md). It answers with their DID and the handle their DID document names. It answers for:

  • the caller themselves, with whether the host starts groups for them (canCreateGroup);
  • anyone the host shows: a member of one of its groups, or someone asking to join one.

For anyone else it answers ActorNotFound.

Why

The lexicon was here, and the method was not. The rule is the prototype's getActor: the host names only people it already shows, so the method can't be used to look up just anyone.

How it was checked

tests/actors.rs adds names_a_person_the_host_shows. It covers oneself, with canCreateGroup both true and false (GROUP_FOUNDERS), strangers refused, a member and someone asking to join both shown, and no answer without auth. just cov is at 100% locally.

Shortcomings

A view carries the DID and handle only, as actor_view makes them elsewhere: no display name or avatar, which would mean reading each person's profile from their PDS.

🤖 Generated with Claude Code

Approved

This adds fyi.opensocial.getActor. A signed-in caller gets the DID and handle for themselves (with canCreateGroup) or for anyone who is in a group here or has a pending join request. Everyone else gets ActorNotFound. The route, the docs (groups.md, the design README) and a test are all included.

I found nothing that must change.

  • Join requests: asking_anywhere reads join_request, whose rows are deleted when a request is decided or cancelled. So "asking to join" means a request that is still pending.
  • Group state: asking_anywhere doesn't check that the group is switched on, but groups_of does. A person with a pending request to a deactivated group would still be shown. That's a minor inconsistency, and only worth fixing if you want the two paths to match.
  • Visibility: any signed-in caller learns that a DID is a member or requester of some group here, without learning which group. That is what your stated rule allows.
  • Tests: they cover oneself with canCreateGroup both true and false, strangers refused, a member, a requester, and no auth.
Merged as e83cd5a