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:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user