mirror of
https://github.com/louislam/uptime-kuma.git
synced 2024-11-27 16:54:04 +00:00
Fix Mattermost when channel is empty #1468
This commit is contained in:
parent
a2d9474e85
commit
6a30dbd71a
1 changed files with 8 additions and 3 deletions
|
@ -15,12 +15,17 @@ class Mattermost extends NotificationProvider {
|
||||||
let mattermostTestData = {
|
let mattermostTestData = {
|
||||||
username: mattermostUserName,
|
username: mattermostUserName,
|
||||||
text: msg,
|
text: msg,
|
||||||
}
|
};
|
||||||
await axios.post(notification.mattermostWebhookUrl, mattermostTestData)
|
await axios.post(notification.mattermostWebhookUrl, mattermostTestData);
|
||||||
return okMsg;
|
return okMsg;
|
||||||
}
|
}
|
||||||
|
|
||||||
const mattermostChannel = notification.mattermostchannel.toLowerCase();
|
let mattermostChannel;
|
||||||
|
|
||||||
|
if (typeof notification.mattermostchannel === "string") {
|
||||||
|
mattermostChannel = notification.mattermostchannel.toLowerCase();
|
||||||
|
}
|
||||||
|
|
||||||
const mattermostIconEmoji = notification.mattermosticonemo;
|
const mattermostIconEmoji = notification.mattermosticonemo;
|
||||||
const mattermostIconUrl = notification.mattermosticonurl;
|
const mattermostIconUrl = notification.mattermosticonurl;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue