docs: note ping arm in dispatch_op is unreachable

This commit is contained in:
damocles 2026-06-15 20:28:31 +02:00
commit 3b26f58a00

View file

@ -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,