diff --git a/CHANGELOG.md b/CHANGELOG.md index 452c87c669f..fedb10cf527 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -36,6 +36,7 @@ Docs: https://docs.openclaw.ai - Hooks/doctor: warn when `hooks.transformsDir` points outside the canonical hooks transform directory, so invalid workspace skill paths get a direct recovery hint before the Gateway crash-loops. Fixes #75853. Thanks @midobk. - Proxy/audio: convert standard `FormData` bodies before proxy-backed undici fetches, so audio transcription and multipart uploads no longer send `[object FormData]` when `HTTP_PROXY` or `HTTPS_PROXY` is configured. Fixes #48554. Thanks @dco5. - Discord: allow explicitly configured ack reactions in tool-only guild channels while keeping automatic lifecycle/status reactions suppressed. Fixes #74922. Thanks @samvilian and @BlueBirdBack. +- Discord: preserve attachment and sticker filenames when saving inbound media, so agents can see human-readable file names instead of only UUID-based paths. Fixes #59744. Thanks @xela92 and @rockcent. - Gateway/diagnostics: include a bounded redacted startup error message in stability bundles, so crash-loop reports identify the failing plugin or contract without exposing secrets. Refs #75797. Thanks @ymebosma. - Gateway/pricing: abort in-flight model pricing catalog fetches when Gateway shutdown stops the refresh loop, and avoid post-stop cache writes or refresh timers. Fixes #72208. Thanks @rzcq. - Codex/app-server: make startup retry cleanup ownership-aware so concurrent Codex lanes cannot close another lane's freshly restarted shared app-server client. Thanks @vincentkoc. diff --git a/extensions/discord/src/monitor/message-media.ts b/extensions/discord/src/monitor/message-media.ts index 382377f5473..9d4272d39e0 100644 --- a/extensions/discord/src/monitor/message-media.ts +++ b/extensions/discord/src/monitor/message-media.ts @@ -295,6 +295,7 @@ async function appendResolvedMediaFromAttachments(params: { fetched.contentType ?? attachment.content_type, "inbound", params.maxBytes, + attachment.filename, ); params.out.push({ path: saved.path, @@ -402,6 +403,7 @@ async function appendResolvedMediaFromStickers(params: { fetched.contentType, "inbound", params.maxBytes, + candidate.fileName, ); params.out.push({ path: saved.path, diff --git a/extensions/discord/src/monitor/message-utils.test.ts b/extensions/discord/src/monitor/message-utils.test.ts index 9e2f01429b1..9b78e51b1f4 100644 --- a/extensions/discord/src/monitor/message-utils.test.ts +++ b/extensions/discord/src/monitor/message-utils.test.ts @@ -94,7 +94,13 @@ function expectSinglePngDownload(params: { }); expectDiscordCdnSsrFPolicy(call.ssrfPolicy); expect(saveMediaBuffer).toHaveBeenCalledTimes(1); - expect(saveMediaBuffer).toHaveBeenCalledWith(expect.any(Buffer), "image/png", "inbound", 512); + expect(saveMediaBuffer).toHaveBeenCalledWith( + expect.any(Buffer), + "image/png", + "inbound", + 512, + params.filePathHint, + ); expect(params.result).toEqual([ { path: params.expectedPath,