Repository: louislam/uptime-kuma
File: server/notification-providers/feishu.js (JavaScript)

Code before:
                                        {
                                            tag: "text",
                                            text:
                                                "[Down] " +
                                                heartbeatJSON["msg"] +
                                                "\nTime (UTC): " +
                                                heartbeatJSON["time"],
                                        },
                                    ],
                                ],
                            },
                        },
                    },
                };
                await axios.post(feishuWebHookUrl, downdata);
                return okMsg;
            }

            if (heartbeatJSON["status"] == UP) {
                let updata = {
                    msg_type: "post",
                    content: {
                        post: {
                            zh_cn: {
                                title:
                                    "UptimeKuma Alert: " + monitorJSON["name"],
                                content: [
                                    [
                                        {
                                            tag: "text",
                                            text:
                                                "[Up] " +
                                                heartbeatJSON["msg"] +
                                                "\nTime (UTC): " +
                                                heartbeatJSON["time"],
                                        },
                                    ],
                                ],
                            },
                        },
                    },
                };
                await axios.post(feishuWebHookUrl, updata);
                return okMsg;
            }
        } catch (error) {
            this.throwGeneralAxiosError(error);
        }
    }
}


Review comment (suggestion):
```suggestion
                                title: "UptimeKuma Alert: " + monitorJSON["name"],
```

Code after:
                                            tag: "text",
                                            text:
                                                "[Down] " +
                                                heartbeatJSON["msg"] +
                                                "\nTime (UTC): " +
                                                heartbeatJSON["time"],
                                        },
                                    ],
                                ],
                            },
                        },
                    },
                };
                await axios.post(feishuWebHookUrl, downdata);
                return okMsg;
            }

            if (heartbeatJSON["status"] == UP) {
                let updata = {
                    msg_type: "post",
                    content: {
                        post: {
                            zh_cn: {
                                title: "UptimeKuma Alert: " + monitorJSON["name"],
                                content: [
                                    [
                                        {
                                            tag: "text",
                                            text:
                                                "[Up] " +
                                                heartbeatJSON["msg"] +
                                                "\nTime (UTC): " +
                                                heartbeatJSON["time"],
                                        },
                                    ],
                                ],
                            },
                        },
                    },
                };
                await axios.post(feishuWebHookUrl, updata);
                return okMsg;
            }
        } catch (error) {
            this.throwGeneralAxiosError(error);
        }
    }
}

module.exports = Feishu;