fix: preserve discord inbound media filenames · openclaw/openclaw@127da4c
steipete
·
2026-05-02
·
via Recent Commits to openclaw:main
File tree
extensions/discord/src/monitor
| Original file line number | Diff line number | Diff line change |
|---|
@@ -36,6 +36,7 @@ Docs: https://docs.openclaw.ai
|
36 | 36 | - 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. |
37 | 37 | - 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. |
38 | 38 | - Discord: allow explicitly configured ack reactions in tool-only guild channels while keeping automatic lifecycle/status reactions suppressed. Fixes #74922. Thanks @samvilian and @BlueBirdBack. |
| 39 | +- 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. |
39 | 40 | - 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. |
40 | 41 | - 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. |
41 | 42 | - 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. |
|
| Original file line number | Diff line number | Diff line change |
|---|
@@ -295,6 +295,7 @@ async function appendResolvedMediaFromAttachments(params: {
|
295 | 295 | fetched.contentType ?? attachment.content_type, |
296 | 296 | "inbound", |
297 | 297 | params.maxBytes, |
| 298 | +attachment.filename, |
298 | 299 | ); |
299 | 300 | params.out.push({ |
300 | 301 | path: saved.path, |
@@ -402,6 +403,7 @@ async function appendResolvedMediaFromStickers(params: {
|
402 | 403 | fetched.contentType, |
403 | 404 | "inbound", |
404 | 405 | params.maxBytes, |
| 406 | +candidate.fileName, |
405 | 407 | ); |
406 | 408 | params.out.push({ |
407 | 409 | path: saved.path, |
|
| Original file line number | Diff line number | Diff line change |
|---|
@@ -94,7 +94,13 @@ function expectSinglePngDownload(params: {
|
94 | 94 | }); |
95 | 95 | expectDiscordCdnSsrFPolicy(call.ssrfPolicy); |
96 | 96 | expect(saveMediaBuffer).toHaveBeenCalledTimes(1); |
97 | | -expect(saveMediaBuffer).toHaveBeenCalledWith(expect.any(Buffer), "image/png", "inbound", 512); |
| 97 | +expect(saveMediaBuffer).toHaveBeenCalledWith( |
| 98 | +expect.any(Buffer), |
| 99 | +"image/png", |
| 100 | +"inbound", |
| 101 | +512, |
| 102 | +params.filePathHint, |
| 103 | +); |
98 | 104 | expect(params.result).toEqual([ |
99 | 105 | { |
100 | 106 | path: params.expectedPath, |
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。