Table: federation_inbox
One row per federation activity admitted through ingress validation. Requests rejected before insertion do not create rows here. The inbox handler stores each admitted activity as pending, and a background worker then marks it processed, rejected or failed. The unique activity_uri makes a replayed activity a no-op instead of a second row.
Connected to
Section titled “Connected to”This table references:
federation_peers(id) via columnpeer_idactivities(id) via columncorrelation_activity_id
Columns
Section titled “Columns”| Column | Type | Nullable | Notes |
|---|---|---|---|
id | uuid | no | Default gen_random_uuid() |
activity_uri | text | no | - |
peer_id | uuid | no | References federation_peers(id) |
actor_uri | text | no | - |
activity_type | text | no | - |
object_kind | text | yes | - |
object_id | uuid | yes | - |
envelope_json | jsonb | no | - |
http_sig_key | text | no | - |
received_at | timestamp | no | Default now() |
status | text | no | Default 'pending'::text |
reject_reason | text | yes | - |
dispatch_attempts | integer | no | Default 0 |
last_attempt_at | timestamp | yes | - |
last_error | text | no | Default ''::text |
processed_at | timestamp | yes | - |
correlation_activity_id | uuid | yes | References activities(id) |
created_at | timestamp | no | Default now() |
updated_at | timestamp | no | Default now() |
was_encrypted | boolean | no | Default false. True when the envelope arrived with an encryption block and took the decryption path; false for plaintext envelopes. The sender-side counterpart is federation_outbox.was_encrypted. |
decrypted_with_key_version | integer | yes | Which version of the receiving user’s X25519 key decrypted the envelope. NULL when was_encrypted is false. |
Constraints
Section titled “Constraints”CONSTRAINT federation_inbox_status_check CHECK ((status = ANY (ARRAY['pending'::text, 'processed'::text, 'rejected'::text, 'failed'::text])))
Full DDL
Section titled “Full DDL”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_inbox ( id uuid DEFAULT gen_random_uuid() NOT NULL, activity_uri text NOT NULL, peer_id uuid NOT NULL, actor_uri text NOT NULL, activity_type text NOT NULL, object_kind text, object_id uuid, envelope_json jsonb NOT NULL, http_sig_key text NOT NULL, received_at timestamp with time zone DEFAULT now() NOT NULL, status text DEFAULT 'pending'::text NOT NULL, reject_reason text, dispatch_attempts integer DEFAULT 0 NOT NULL, last_attempt_at timestamp with time zone, last_error text DEFAULT ''::text NOT NULL, processed_at timestamp with time zone, correlation_activity_id uuid, 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, decrypted_with_key_version integer, CONSTRAINT federation_inbox_status_check CHECK ((status = ANY (ARRAY['pending'::text, 'processed'::text, 'rejected'::text, 'failed'::text]))));See the schema overview for context.