Skip to content

fix(im): handle unresolved Feishu resource images - #2761

Open
Jonesxq wants to merge 1 commit into
Tencent:mainfrom
Jonesxq:fix/feishu-resource-image-fallback
Open

fix(im): handle unresolved Feishu resource images#2761
Jonesxq wants to merge 1 commit into
Tencent:mainfrom
Jonesxq:fix/feishu-resource-image-fallback

Conversation

@Jonesxq

@Jonesxq Jonesxq commented Aug 21, 2026

Copy link
Copy Markdown
Contributor

Description

Feishu interactive cards reject unresolved resource:// Markdown images as invalid image keys. The adapter's image matcher only handled HTTP(S), so unresolved resource handles passed through unchanged and could make the entire card update fail.

This change:

  • recognizes resource:// image targets in resolveMarkdownImages;
  • degrades unresolved resource images to ordinary Markdown links using the existing regional fallback label;
  • keeps the existing HTTP(S) upload-to-image_key path unchanged.

Type of Change

  • 🐛 Bug fix
  • ✨ New feature
  • 💥 Breaking change
  • 📚 Documentation update
  • 🎨 Refactor
  • ⚡ Performance improvement
  • 🧪 Test
  • 🔧 Configuration / Build / CI

Related Issue

Fixes #2726

Testing

go test ./internal/im/feishu -count=1
go test ./internal/im/... -count=1
go vet ./internal/im/feishu
golangci-lint run --new-from-rev=origin/main ./internal/im/feishu

All commands pass; golangci-lint reports 0 issues.

The full repository suite was not run because the change is isolated to the Feishu adapter; the complete internal/im/... package tree was tested.

Checklist

  • git diff --check origin/main...HEAD passes
  • Changed source files are formatted
  • Targeted tests for the changed packages/components pass
  • Diff-scoped lint passes where applicable
  • Full-repository checks were run, or any unrelated/environment-dependent limitations are documented above
  • Self-reviewed the code
  • Added tests covering the change
  • Documentation is not affected; no public API or configuration changed
  • No breaking changes

Screenshots / Recordings

Not applicable; this is an IM adapter behavior fix.

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: 飞书 IM 流式回复卡片因 resource:// 图片未转换 image_key 报 200570,卡片卡在'思考中'

1 participant