docs(invites): correct restriction wording and owner-link doc comment

TESTING.md now describes `invite_restricted` as a restriction on the
claiming account or the account that owns it, matching the relay and the
client copy from 9ae85092; issuer restrictions return `invite_invalid`.
The `materialize_nip_oa_owner` comment no longer describes the removed
`Result<bool, DbError>` return.

Co-authored-by: Elrond <28d6302a099e5225b02c4155ac4236e4912603df2ab08dbfc2f4fef08ce598c8@buzz.block.builderlab.xyz>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Luke Tornquist <tornquist@squareup.com>
This commit is contained in:
Luke Tornquist
2026-10-26 17:59:23 -04:00
parent 1163e202ee
commit 49db2d8cf7
2 changed files with 7 additions and 5 deletions

View File

@@ -167,8 +167,10 @@ Rejected claims create no users or owner links.
Minting with a verified owner that differs from an agent's recorded owner
returns HTTP 403 `invite_owner_mismatch`; a storage failure while establishing
that link remains HTTP 503. Web, desktop, and mobile claim errors explain
`invite_restricted` as an account or issuer restriction in this community:
contact a community administrator, or retry after a temporary restriction ends.
`invite_restricted` as a restriction on the claiming account, or on the account
that owns it, in this community: contact a community administrator, or retry
after a temporary restriction ends. An issuer restriction returns
`invite_invalid`, so a claim never reveals the issuer's moderation state.
`invite_owner_mismatch` asks for the correct account or owner identity. Neither
error suggests a fresh link as a workaround, and neither automatically retries.
Claim and mint restriction reads use the writer inside a transaction serialized

View File

@@ -510,13 +510,13 @@ pub mod relay_members {
/// Both principals are ensured first because `agent_owner_pubkey` has a
/// community-scoped foreign key. The mapping is first-write-wins; an
/// existing mapping is accepted only when it names the same owner.
/// Returns `Ok(false)` for an owner mismatch and `Err` for storage failure.
/// Returns `true` only when the link is recorded; an owner conflict and a
/// storage failure both return `false`. Callers that must tell denial
/// from unavailability use `link_agent_owner` directly.
///
/// A mapping already confirmed in `observer_owner_cache` returns early:
/// `agent_owner_pubkey` is set once and never cleared, so the writes
/// below would all be no-ops. HTTP agents call this on every request.
/// Returns `Ok(false)` for a confirmed owner mismatch; storage failures
/// propagate so callers can distinguish denial from unavailability.
pub async fn materialize_nip_oa_owner(
state: &AppState,
tenant: &TenantContext,