mirror of
https://github.com/block/buzz.git
synced 2026-10-27 04:30:52 +00:00
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:
@@ -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
|
Minting with a verified owner that differs from an agent's recorded owner
|
||||||
returns HTTP 403 `invite_owner_mismatch`; a storage failure while establishing
|
returns HTTP 403 `invite_owner_mismatch`; a storage failure while establishing
|
||||||
that link remains HTTP 503. Web, desktop, and mobile claim errors explain
|
that link remains HTTP 503. Web, desktop, and mobile claim errors explain
|
||||||
`invite_restricted` as an account or issuer restriction in this community:
|
`invite_restricted` as a restriction on the claiming account, or on the account
|
||||||
contact a community administrator, or retry after a temporary restriction ends.
|
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
|
`invite_owner_mismatch` asks for the correct account or owner identity. Neither
|
||||||
error suggests a fresh link as a workaround, and neither automatically retries.
|
error suggests a fresh link as a workaround, and neither automatically retries.
|
||||||
Claim and mint restriction reads use the writer inside a transaction serialized
|
Claim and mint restriction reads use the writer inside a transaction serialized
|
||||||
|
|||||||
@@ -510,13 +510,13 @@ pub mod relay_members {
|
|||||||
/// Both principals are ensured first because `agent_owner_pubkey` has a
|
/// Both principals are ensured first because `agent_owner_pubkey` has a
|
||||||
/// community-scoped foreign key. The mapping is first-write-wins; an
|
/// community-scoped foreign key. The mapping is first-write-wins; an
|
||||||
/// existing mapping is accepted only when it names the same owner.
|
/// 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:
|
/// A mapping already confirmed in `observer_owner_cache` returns early:
|
||||||
/// `agent_owner_pubkey` is set once and never cleared, so the writes
|
/// `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.
|
/// 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(
|
pub async fn materialize_nip_oa_owner(
|
||||||
state: &AppState,
|
state: &AppState,
|
||||||
tenant: &TenantContext,
|
tenant: &TenantContext,
|
||||||
|
|||||||
Reference in New Issue
Block a user