Monorepo for Tangled forked from tangled.org/core

idresolver: add PDSClient() helper to reduce duplication #21

Open nolith.dev
targeting master from local-dev
Open opened by and assigned to nolith.dev
targeting master from local-dev

Add a PDSClient() method on *Resolver that combines the common pattern of resolving an identity and creating an XRPC client for its PDS endpoint.

This pattern was duplicated across ~15 call sites in knotserver and spindle. Each call site manually called ResolveIdent(), checked Handle.IsInvalidHandle(), called PDSEndpoint(), and constructed an xrpc.Client. The new helper consolidates this into a single call.

Also fixes knotserver/internal.go PushAllowed handler which was creating a new DefaultResolver on every request instead of using the shared resolver.

AI-assisted: GitLab Duo Agentic Chat (Claude Opus 4.6) Signed-off-by: Alessio Caiazza code.git@caiazza.info

Commits 1

idresolver: add PDSClient() helper to reduce duplication