create function sendNotification

This commit is contained in:
joseph le 2023-09-27 16:38:14 +07:00
parent 6dd4c82247
commit 83575796a5
1 changed files with 12 additions and 6 deletions

View File

@ -85,7 +85,6 @@ const sendNotification = async () => {
client.messages.send(params);
}
} else {
console.log({ auto1: auto1, auto2: auto2, log: log });
let autoStatus =
auto1?.includes("succeeded") && auto2?.includes("succeeded")
? ":check:"
@ -103,12 +102,19 @@ const sendNotification = async () => {
"**|" +
logStatus +
"|";
// let params = {
// type: "stream",
// to: "System Logs",
// topic: "stream events",
// content: content,
// };
let params = {
type: "stream",
to: "System Logs",
topic: "stream events",
content: content,
};
type: "stream",
to: "Result test - auto.nswteam.net",
topic: "test",
content: content,
};
await client.messages.send(params);
}