knowPerson
uses tcmts.registry.people, which uses tcmts.atproto.lib.server.table, which uses tcmts.atproto.lib.server.Table, which uses #tcm/host (database)
Someone the registry knows from here on: a row in people, with the handle their DID document names (checked
both ways), if they weren't one already; their profile follows (renewProfiles).
import { resolve } from "#codebase/tcmts/atproto"; import { people } from "#codebase/tcmts/registry"; export async function knowPerson(did: string): Promise<void> { if (await people.findOne({ did })) return; const handle = await resolve(did).then( (i) => i.handle, () => undefined, ); try { await people.insert({ did, seq: 0, ...(handle ? { handle } : {}) }); } catch { // (kept meanwhile: one row per DID) } }