From 3b26f58a0072ed5551290d01f0e1b46f1ba30d06 Mon Sep 17 00:00:00 2001 From: damocles Date: Mon, 15 Jun 2026 20:28:31 +0200 Subject: [PATCH] docs: note ping arm in dispatch_op is unreachable --- hive-matrix-mcp/src/socket.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/hive-matrix-mcp/src/socket.rs b/hive-matrix-mcp/src/socket.rs index 03bf1c8d..91b2d76a 100644 --- a/hive-matrix-mcp/src/socket.rs +++ b/hive-matrix-mcp/src/socket.rs @@ -74,6 +74,9 @@ async fn dispatch(req: DaemonRequest, registry: &Registry) -> DaemonResponse { async fn dispatch_op(op: DaemonOp, client: &Client) -> DaemonResponse { match op { + // Unreachable in practice: `dispatch` handles Ping before resolving + // a client (so a health probe works before any account restores). + // Kept for an exhaustive match. DaemonOp::Ping => DaemonResponse::ok(&serde_json::json!({"ok": true})), DaemonOp::SendMessage { room, body } => handlers::send_message(client, &room, &body).await, DaemonOp::SendDm { user_id, body } => handlers::send_dm(client, &user_id, &body).await,