v0.3.18: 消息模版API + global-config端点

This commit is contained in:
2026-05-17 16:41:46 +08:00
parent ad186431dd
commit 95df193e26
4 changed files with 34 additions and 3 deletions

View File

@@ -18,6 +18,12 @@ export { getAllNotifiers, getNotifier, getAllNotifierParams };
let _globalChannelsCache: NotifyChannel[] | null = null;
let _configHash = '';
/** Returns the full global_notify_config JSON */
export function getGlobalNotifyConfig(): Record<string, any> {
const raw = getSystemConfig('global_notify_config') || '{}';
try { return JSON.parse(raw); } catch { return {}; }
}
function getGlobalNotifyConfigs(): NotifyChannel[] {
const raw = getSystemConfig('global_notify_config') || '{}';
let globalConfig: any = {};