@Override
    public void doAlarm(List<AlarmMessage> alarmMessages) throws Exception {
        Map<String, FeishuSettings> settingsMap = alarmRulesWatcher.getFeishuSettings();
        if (settingsMap == null || settingsMap.isEmpty()) {
            return;
        }
        Map<String, List<AlarmMessage>> groupedMessages = groupMessagesByHook(alarmMessages);
        for (Map.Entry<String, List<AlarmMessage>> entry : groupedMessages.entrySet()) {
            var hookName = entry.getKey();
            var messages = entry.getValue();
            var setting = settingsMap.get(hookName);
            if (setting == null || CollectionUtils.isEmpty(setting.getWebhooks()) || CollectionUtils.isEmpty(
                messages)) {
                continue;
            }
            for (final var webHookUrl : setting.getWebhooks()) {
                for (final var alarmMessage : messages) {
                    final var requestBody = getRequestBody(webHookUrl, alarmMessage, setting.getTextTemplate());
                    try {
                        post(URI.create(webHookUrl.getUrl()), requestBody, Map.of());
                    } catch (Exception e) {
                        log.error("Failed to send alarm message to Feishu: {}", webHookUrl.getUrl(), e);
                    }
                }
            }
        }
    }
@Test
    public void testFeishuWebhookWithoutSign() throws Exception {
        List<FeishuSettings.WebHookUrl> webHooks = new ArrayList<>();
        webHooks.add(new FeishuSettings.WebHookUrl("", "http://127.0.0.1:" + SERVER.httpPort() + "/feishuhook/receiveAlarm?token=dummy_token"));
        Rules rules = new Rules();
        String template = "{\"msg_type\":\"text\",\"content\":{\"text\":\"Skywaling alarm: %s\"}}";
        FeishuSettings setting1 = new FeishuSettings("setting1", AlarmHooksType.feishu, true);
        setting1.setWebhooks(webHooks);
        setting1.setTextTemplate(template);
        FeishuSettings setting2 = new FeishuSettings("setting2", AlarmHooksType.feishu, false);
        setting2.setWebhooks(webHooks);
        setting2.setTextTemplate(template);
        rules.getFeishuSettingsMap().put(setting1.getFormattedName(), setting1);
        rules.getFeishuSettingsMap().put(setting2.getFormattedName(), setting2);

        AlarmRulesWatcher alarmRulesWatcher = new AlarmRulesWatcher(rules, null);
        FeishuHookCallback feishuHookCallback = new FeishuHookCallback(alarmRulesWatcher);
        List<AlarmMessage> alarmMessages = new ArrayList<>(2);
        AlarmMessage alarmMessage = new AlarmMessage();
        alarmMessage.setScopeId(DefaultScopeDefine.SERVICE);
        alarmMessage.setRuleName("service_resp_time_rule");
        alarmMessage.setAlarmMessage("alarmMessage with [DefaultScopeDefine.All]");
        alarmMessage.getHooks().add(setting1.getFormattedName());
        alarmMessages.add(alarmMessage);
        AlarmMessage anotherAlarmMessage = new AlarmMessage();
        anotherAlarmMessage.setRuleName("service_resp_time_rule_2");
        anotherAlarmMessage.setScopeId(DefaultScopeDefine.ENDPOINT);
        anotherAlarmMessage.setAlarmMessage("anotherAlarmMessage with [DefaultScopeDefine.Endpoint]");
        anotherAlarmMessage.getHooks().add(setting2.getFormattedName());
        alarmMessages.add(anotherAlarmMessage);
        feishuHookCallback.doAlarm(alarmMessages);
        Assertions.assertTrue(IS_SUCCESS.get());
    }