From 40fcfc947981de4731fc91d6efd47fc3d3f55963 Mon Sep 17 00:00:00 2001 From: Peter Steinberger Date: Fri, 9 Jan 2026 17:34:22 +0100 Subject: [PATCH] test: cover hook deliver default (#533) (thanks @mcinteerj) --- CHANGELOG.md | 1 + src/gateway/hooks.test.ts | 10 ++++++++++ 2 files changed, 11 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 569a3f1ee..cb5789ec3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,6 +16,7 @@ - Agent: add claude-cli/opus-4.5 runner via Claude CLI with resume support (tools disabled). - CLI: move `clawdbot message` to subcommands (`message send|poll|…`), fold Discord/Slack/Telegram/WhatsApp tools into `message`, and require `--provider` unless only one provider is configured. - CLI: improve `logs` output (pretty/plain/JSONL), add gateway unreachable hint, and document logging. +- Hooks: default hook agent delivery to true. (#533) — thanks @mcinteerj - WhatsApp: route queued replies to the original sender instead of the bot's own number. (#534) — thanks @mcinteerj - Models: add OAuth expiry checks in doctor, expanded `models status` auth output (missing auth + `--check` exit codes). (#538) — thanks @latitudeki5223 - Deps: bump Pi to 0.40.0 and drop pi-ai patch (upstream 429 fix). (#543) — thanks @mcinteerj diff --git a/src/gateway/hooks.test.ts b/src/gateway/hooks.test.ts index 09f9e66a3..c54606184 100644 --- a/src/gateway/hooks.test.ts +++ b/src/gateway/hooks.test.ts @@ -66,6 +66,16 @@ describe("gateway hooks helpers", () => { expect(ok.value.sessionKey).toBe("hook:fixed"); expect(ok.value.provider).toBe("last"); expect(ok.value.name).toBe("Hook"); + expect(ok.value.deliver).toBe(true); + } + + const explicitNoDeliver = normalizeAgentPayload( + { message: "hello", deliver: false }, + { idFactory: () => "fixed" }, + ); + expect(explicitNoDeliver.ok).toBe(true); + if (explicitNoDeliver.ok) { + expect(explicitNoDeliver.value.deliver).toBe(false); } const imsg = normalizeAgentPayload(