docs: note ping arm in dispatch_op is unreachable
This commit is contained in:
parent
8e79eb4f26
commit
3b26f58a00
1 changed files with 3 additions and 0 deletions
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Reference in a new issue