recheckAttestation
uses tcmts.registry.attestations, which uses tcmts.server.table, which uses tcmts.server.Table, which uses #tcm/host (database)
When Jetstream says a review, advisory or yank was deleted (a job): gone, if its writer's repository no longer holds it; kept, if it does (an event alone removes nothing).
import { NoSuchRecord, NotTheirs, signedRecord } from "#codebase/tcmts/atproto"; import { attestations } from "#codebase/tcmts/registry"; export async function recheckAttestation(uri: string): Promise<void> { const found = await attestations.findOne({ uri }); if (!found) return; const [, , did, collection, rkey] = uri.split("/") as [string, string, string, string, string]; try { await signedRecord(did, collection, rkey); } catch (e) { if (e instanceof NoSuchRecord) await attestations.delete(found.id); else if (!(e instanceof NotTheirs)) throw e; } }
uses
- tcmts.atproto.NoSuchRecord
- tcmts.atproto.NotTheirs
- tcmts.atproto.signedRecord
- tcmts.registry.attestations