[autofix.ci] apply automated fixes
This commit is contained in:
parent
27f68ef52d
commit
8efce25467
@ -19,7 +19,11 @@ class WeCom extends NotificationProvider {
|
||||
};
|
||||
config = this.getAxiosConfigWithProxy(config);
|
||||
let body = this.composeMessage(notification, heartbeatJSON, msg);
|
||||
await axios.post(`https://qyapi.weixin.qq.com/cgi-bin/webhook/send?key=${notification.weComBotKey}`, body, config);
|
||||
await axios.post(
|
||||
`https://qyapi.weixin.qq.com/cgi-bin/webhook/send?key=${notification.weComBotKey}`,
|
||||
body,
|
||||
config
|
||||
);
|
||||
return okMsg;
|
||||
} catch (error) {
|
||||
this.throwGeneralAxiosError(error);
|
||||
@ -41,27 +45,27 @@ class WeCom extends NotificationProvider {
|
||||
if (msg != null && heartbeatJSON != null && heartbeatJSON["status"] === DOWN) {
|
||||
title = "UptimeKuma Monitor Down";
|
||||
}
|
||||
|
||||
|
||||
let textObj = {
|
||||
content: title + "\n" + msg
|
||||
content: title + "\n" + msg,
|
||||
};
|
||||
|
||||
|
||||
// Handle mentioned_mobile_list if configured
|
||||
if (notification.weComMentionedMobileList && notification.weComMentionedMobileList.trim()) {
|
||||
// Split by comma, trim whitespace, and filter out empty strings
|
||||
let mobileList = notification.weComMentionedMobileList
|
||||
.split(",")
|
||||
.map(mobile => mobile.trim())
|
||||
.filter(mobile => mobile.length > 0);
|
||||
|
||||
.map((mobile) => mobile.trim())
|
||||
.filter((mobile) => mobile.length > 0);
|
||||
|
||||
if (mobileList.length > 0) {
|
||||
textObj.mentioned_mobile_list = mobileList;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
return {
|
||||
msgtype: "text",
|
||||
text: textObj
|
||||
text: textObj,
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
@ -26,7 +26,13 @@
|
||||
|
||||
<div class="mb-3">
|
||||
<label for="wecom-mentioned-mobile-list" class="form-label">{{ $t("WeCom Mentioned Mobile List") }}</label>
|
||||
<input id="wecom-mentioned-mobile-list" v-model="$parent.notification.weComMentionedMobileList" type="text" class="form-control" placeholder="13800001111,13900002222,@all">
|
||||
<input
|
||||
id="wecom-mentioned-mobile-list"
|
||||
v-model="$parent.notification.weComMentionedMobileList"
|
||||
type="text"
|
||||
class="form-control"
|
||||
placeholder="13800001111,13900002222,@all"
|
||||
/>
|
||||
<p class="form-text">{{ $t("WeCom Mentioned Mobile List Description") }}</p>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user