fix: correct whatsapp send-api test mock path (openclaw#15594) thanks @TsekaLuk

This commit is contained in:
Peter Steinberger
2026-02-13 18:30:28 +01:00
parent eaa835317b
commit 122fb924e2
2 changed files with 7 additions and 1 deletions

View File

@@ -16,6 +16,7 @@ Docs: https://docs.openclaw.ai
- Security/Gateway: breaking default-behavior change - canvas IP-based auth fallback now only accepts machine-scoped addresses (RFC1918, link-local, ULA IPv6, CGNAT); public-source IP matches now require bearer token auth. (#14661) Thanks @sumleo.
- Security/Gateway: sanitize and truncate untrusted WebSocket header values in pre-handshake close logs to reduce log-poisoning risk. Thanks @thewilloftheshadow.
- Security/WhatsApp: enforce `0o600` on `creds.json` and `creds.json.bak` on save/backup/restore paths to reduce credential file exposure. (#10529) Thanks @abdelsfane.
- WhatsApp: preserve outbound document filenames for web-session document sends instead of always sending `"file"`. (#15594) Thanks @TsekaLuk.
- Security/Gateway + ACP: block high-risk tools (`sessions_spawn`, `sessions_send`, `gateway`, `whatsapp_login`) from HTTP `/tools/invoke` by default with `gateway.tools.{allow,deny}` overrides, and harden ACP permission selection to fail closed when tool identity/options are ambiguous while supporting `allow_always`/`reject_always`. (#15390) Thanks @aether-ai-agent.
- Gateway/Tools Invoke: sanitize `/tools/invoke` execution failures while preserving `400` for tool input errors and returning `500` for unexpected runtime failures, with regression coverage and docs updates. (#13185) Thanks @davidrudduck.
- MS Teams: preserve parsed mention entities/text when appending OneDrive fallback file links, and accept broader real-world Teams mention ID formats (`29:...`, `8:orgid:...`) while still rejecting placeholder patterns. (#15436) Thanks @hyojin.

View File

@@ -1,7 +1,7 @@
import { beforeEach, describe, expect, it, vi } from "vitest";
const recordChannelActivity = vi.fn();
vi.mock("../../../infra/channel-activity.js", () => ({
vi.mock("../../infra/channel-activity.js", () => ({
recordChannelActivity: (...args: unknown[]) => recordChannelActivity(...args),
}));
@@ -31,6 +31,11 @@ describe("createWebSendApi", () => {
mimetype: "application/pdf",
}),
);
expect(recordChannelActivity).toHaveBeenCalledWith({
channel: "whatsapp",
accountId: "main",
direction: "outbound",
});
});
it("falls back to default document filename when fileName is absent", async () => {