Aller au contenu

Table: federation_outbox

Ce contenu n’est pas encore disponible dans votre langue.

A per-recipient queue of outbound deliveries, filled from the activities ledger by the outbox dispatcher. Two partial unique indexes, on (activity_id, peer_id) for broadcast rows and on (activity_id, peer_id, target_user_url) for targeted rows, let the dispatcher re-run without adding duplicates. When delivery refuses an activity, its row is marked refused with a refused_reason. The policy that refuses restricted and embargoed content without encryption exists, but the running configuration doesn’t yet give the dispatcher the sensitivity it needs, so that refusal isn’t in effect (#1525).

This table references:

ColumnTypeNullableNotes
iduuidnoDefault gen_random_uuid()
activity_iduuidnoReferences activities(id)
peer_iduuidnoReferences federation_peers(id)
target_user_urltextyes-
statustextnoDefault 'queued'::text
attemptssmallintnoDefault 0
next_attempt_attimestampnoDefault now()
last_attempt_attimestampyes-
last_errortextnoDefault ''::text
sent_attimestampyes-
delivered_with_key_idtextyes-
created_attimestampnoDefault now()
updated_attimestampnoDefault now()
was_encryptedbooleannoDefault false. True when delivery took the encryption path (the peer had negotiated encryption support and the recipient’s key was available); false for plaintext. The envelope sent is authoritative; this column records the outcome for monitoring.
sensitivitytextyes-
refused_reasontextyes-
  • CONSTRAINT federation_outbox_status_check CHECK ((status = ANY (ARRAY['queued'::text, 'sent'::text, 'failed'::text, 'cancelled'::text, 'refused'::text])))

This is the table’s CREATE TABLE statement. Constraints added with separate ALTER TABLE statements, including foreign-key ON DELETE rules, and indexes are defined elsewhere in the dump; see the complete app/schema.sql.

CREATE TABLE public.federation_outbox (
id uuid DEFAULT gen_random_uuid() NOT NULL,
activity_id uuid NOT NULL,
peer_id uuid NOT NULL,
target_user_url text,
status text DEFAULT 'queued'::text NOT NULL,
attempts smallint DEFAULT 0 NOT NULL,
next_attempt_at timestamp with time zone DEFAULT now() NOT NULL,
last_attempt_at timestamp with time zone,
last_error text DEFAULT ''::text NOT NULL,
sent_at timestamp with time zone,
delivered_with_key_id text,
created_at timestamp with time zone DEFAULT now() NOT NULL,
updated_at timestamp with time zone DEFAULT now() NOT NULL,
was_encrypted boolean DEFAULT false NOT NULL,
sensitivity text,
refused_reason text,
CONSTRAINT federation_outbox_status_check CHECK ((status = ANY (ARRAY['queued'::text, 'sent'::text, 'failed'::text, 'cancelled'::text, 'refused'::text])))
);

See the schema overview for context.