fix(send): use stored WECOM_BOT webhook URL and preserve single-chat routing without scene

- Copy account.ext_info into extra.webhook_url for WECOM_BOT sends.
- Allow null conversation_scene for single chats; only enforce scene-based routing for group chats.
- Harden WeComBotSender custom URL handling when placeholder is missing.
This commit is contained in:
2026-07-14 18:45:48 +08:00
parent 11ee7384b3
commit c24891a82e
2 changed files with 23 additions and 4 deletions

View File

@@ -85,7 +85,11 @@ public class WeComBotSender {
private String resolveWebhookUrl(Map<String, Object> extra, String key) {
String customUrl = getString(extra, "webhook_url");
if (customUrl != null && !customUrl.isBlank()) {
return String.format(customUrl, key);
if (customUrl.contains("%s")) {
return customUrl.replace("%s", key);
}
log.warn("[WeComBot] custom webhook_url missing %s placeholder; appending key param");
return customUrl.contains("?") ? customUrl + "&key=" + key : customUrl + "?key=" + key;
}
return String.format(DEFAULT_WEBHOOK_URL, key);
}