feat: support DingTalk rich text images

This commit is contained in:
姚章浩
2026-07-20 18:58:29 +08:00
parent ea54b229ee
commit 6bfa16e5f9
4 changed files with 512 additions and 1 deletions
+4 -1
View File
@@ -151,7 +151,10 @@ func (h *Handler) Handle(ctx context.Context, cb BotCallback) error {
log.Printf("DingTalk image preparation failed: stage=%s", imageFailureStage(err))
return h.sendReply(ctx, webhookURL, imageErrorReply)
}
req.Query = imageQuery
req.Query = strings.TrimSpace(cb.Text)
if req.Query == "" {
req.Query = imageQuery
}
req.Images = []core.ImageInput{image}
default:
return h.sendReply(ctx, webhookURL, unsupportedMessageReply)