From 3988c5823ad638c18c21eff9c9fbadd3d29e8794 Mon Sep 17 00:00:00 2001 From: Jannis Braun <151788261+TheZwiss@users.noreply.github.com> Date: Fri, 24 Apr 2026 19:12:54 +0200 Subject: [PATCH] feat(shared): add no_recipient reason + undeliverable response field (#18) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Additive protocol extension. No consumers yet — follow-up commits wire the new bucket into the relay endpoint, sendCallRelay, sendFederatedCallStart, and the toast copy. --- packages/shared/src/types.ts | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/packages/shared/src/types.ts b/packages/shared/src/types.ts index e5dae5cc..29faa8ec 100644 --- a/packages/shared/src/types.ts +++ b/packages/shared/src/types.ts @@ -362,7 +362,8 @@ export type DmCallUndeliverableReason = | 'peer_rejected' | 'peer_awaiting_approval' | 'peer_transient_failure' - | 'livekit_unavailable'; + | 'livekit_unavailable' + | 'no_recipient'; export type DmCallPhase = 'start' | 'accept' | 'reject' | 'end' | 'host_unreachable'; @@ -967,6 +968,14 @@ export interface FederationRelayRequest { export interface FederationRelayResponse { accepted: string[]; rejected: Array<{ messageId: string; reason: string }>; + /** + * Third classification (additive, v1.x): events that were processed cleanly + * but had no reachable recipient. Distinct from `rejected` (data/protocol + * refusal). Currently used only for `dm_call_start` — other event types + * keep accepted/rejected semantics unchanged. Omitted when empty for + * wire-size hygiene and byte-identical responses in the typical case. + */ + undeliverable?: Array<{ messageId: string; reason: string }>; maxUploadSize: number; }