Skip to content

Fix Telegram media file delivery#69641

Merged
obviyus merged 3 commits intomainfrom
fix/telegram-media-file-delivery
Apr 21, 2026
Merged

Fix Telegram media file delivery#69641
obviyus merged 3 commits intomainfrom
fix/telegram-media-file-delivery

Conversation

@obviyus
Copy link
Copy Markdown
Contributor

@obviyus obviyus commented Apr 21, 2026

Fixes Telegram outbound file delivery in two spots:

  • parse lowercase media: directives during block reply handling so media is sent once
  • preserve the original filename when staging outbound attachments so Telegram does not show the UUID

Tests:

  • pnpm check:changed

@openclaw-barnacle openclaw-barnacle Bot added size: S maintainer Maintainer-authored PR labels Apr 21, 2026
@obviyus obviyus self-assigned this Apr 21, 2026
@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps Bot commented Apr 21, 2026

Greptile Summary

This PR fixes two Telegram media delivery bugs: it makes MEDIA: directive detection case-insensitive in both the block-reply trigger guard (reply-delivery.ts) and the line-stripping loop (parse.ts), and it threads the loaded fileName through to saveMediaBuffer so the original filename is preserved in the staged path instead of just a UUID.

Confidence Score: 5/5

Safe to merge — all changes are narrow, well-tested bug fixes with no regressions introduced.

Both fixes are correct and targeted: the case-insensitive regex/toUpperCase guards are consistent with the existing /media:/i check already present in splitMediaFromOutput, and saveMediaBuffer already accepts originalFilename as an optional fifth parameter so passing media.fileName (which is string | undefined) is type-safe. New unit tests cover both fix paths.

No files require special attention.

Reviews (1): Last reviewed commit: "fix(media): preserve outbound attachment..." | Re-trigger Greptile

@obviyus obviyus force-pushed the fix/telegram-media-file-delivery branch from 32a71c9 to 0d3c827 Compare April 21, 2026 08:47
@obviyus obviyus merged commit f1df354 into main Apr 21, 2026
89 checks passed
@obviyus obviyus deleted the fix/telegram-media-file-delivery branch April 21, 2026 08:49
@obviyus
Copy link
Copy Markdown
Contributor Author

obviyus commented Apr 21, 2026

Landed on main.

zhongmairen pushed a commit to agencyos-cn/openclaw-bad that referenced this pull request Apr 21, 2026
* 'main' of https://github.com/openclaw/openclaw: (653 commits)
  docs(changelog): deduplicate openclaw#67800 entries in Unreleased (openclaw#69670)
  fix(agents): honor explicit long Anthropic cache TTL on custom hosts (openclaw#67800)
  fix: fix Telegram media file delivery (openclaw#69641)
  fix(media): preserve outbound attachment filenames
  fix(media): parse lowercase media directives
  fix(bluebubbles): add opt-in coalesceSameSenderDms for split-send DMs (openclaw#69258)
  fix: centralize provider thinking profiles
  docs: prepare 2026.4.20 changelog
  fix: stage ACP and Codex runtime deps
  fix(gateway): drop stale service env on reinstall
  test: add bundled channel dependency Docker smoke
  test: relax detached task recovery timing assertion
  fix: ignore placeholder shells in runtime detection (openclaw#69308)
  shell: fall back to sh when SHELL is /usr/bin/false or nologin
  fix(browser): clarify DevToolsActivePort attach failures
  fix: sanitize mcp transport warning fields
  fix: launch Windows startup gateway directly
  fix(openai-codex): normalize legacy copilot transport
  fix: narrow MCP stdio env safety filter (openclaw#69540)
  fix(mcp): block dangerous stdio env overrides
  ...
gdibble pushed a commit to gdibble/openclaw that referenced this pull request Apr 21, 2026
medikoo pushed a commit to medikoo/openclaw that referenced this pull request Apr 24, 2026
ogt-redknie pushed a commit to ogt-redknie/OPENX that referenced this pull request May 2, 2026
zhonghe0615 pushed a commit to zhonghe0615/openclaw that referenced this pull request May 7, 2026
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request May 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

maintainer Maintainer-authored PR size: S

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant