Skip to content

fix(dingtalk): support picture/image message inbound - #3283

Closed
MrTreasure wants to merge 1 commit into
sipeed:mainfrom
MrTreasure:fix/dingtalk-image-v3
Closed

fix(dingtalk): support picture/image message inbound#3283
MrTreasure wants to merge 1 commit into
sipeed:mainfrom
MrTreasure:fix/dingtalk-image-v3

Conversation

@MrTreasure

Copy link
Copy Markdown

DingTalk 渠道图片消息支持

变更

  1. import 新增: bytes/encoding/json/io/net/http/os/path/filepath/time, media
  2. struct 加字段: tokenMu, accessToken, tokenExpires (OpenAPI token 缓存)
  3. onChatBotMessageReceived: 支持图片消息, 优雅降级
  4. 新增方法: getAccessToken, downloadInboundPicture, keysOf, stringValue

说明

  • 图片消息走 downloadInboundPicture 下载并存入 MediaStore
  • 任意步骤失败优雅降级(返回 nil, nil),不阻塞文字链路
  • OpenAPI token 缓存 ~2h,提前 120s 过期

…d store

- Add downloadInboundPicture to fetch DingTalk images via OpenAPI
- Add getAccessToken with ~2h cache for DingTalk OAuth2 token
- onChatBotMessageReceived now handles picture/image msgtype
- Graceful degradation: image download failures don't block text
- Add keysOf, stringValue helper functions
@github-actions

Copy link
Copy Markdown

This PR has had no activity for 7 days and has been marked as stale. If you are still working on it, please push an update or leave a comment; otherwise it will be closed automatically in 7 days.

@MrTreasure

Copy link
Copy Markdown
Author

Status update: this fix is still actively maintained and is part of the current local deployment. I have synced with the current upstream master and rerun the targeted DingTalk channel tests; the inbound picture/image handling path passes locally. The branch remains mergeable, and I am available to address any review feedback.

@github-actions

github-actions Bot commented Aug 7, 2026

Copy link
Copy Markdown

This PR has had no activity for 7 days and has been marked as stale. If you are still working on it, please push an update or leave a comment; otherwise it will be closed automatically in 7 days.

@github-actions

Copy link
Copy Markdown

This PR has been closed after 14 days of inactivity. If you would like to continue, feel free to reopen it or submit a new PR.

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant