v0.3.34: 每日汇报增加推送通道选择UI

This commit is contained in:
2026-05-17 21:52:37 +08:00
parent 17b40cea7b
commit cf2796666d
54 changed files with 191 additions and 135 deletions

View File

@@ -24,7 +24,7 @@ export function getGlobalNotifyConfig(): Record<string, any> {
try { return JSON.parse(raw); } catch { return {}; }
}
function getGlobalNotifyConfigs(): NotifyChannel[] {
export function getGlobalNotifyConfigs(): NotifyChannel[] {
const raw = getSystemConfig('global_notify_config') || '{}';
let globalConfig: any = {};
try { globalConfig = JSON.parse(raw); } catch {}
@@ -56,7 +56,7 @@ function checkEventEnabled(eventName: string): boolean {
// ======================== Core send ========================
async function sendToChannels(channels: NotifyChannel[], title: string, content: string, level: NotifyLevel): Promise<void> {
export async function sendToChannels(channels: NotifyChannel[], title: string, content: string, level: NotifyLevel): Promise<void> {
for (const ch of channels) {
try {
await notifyWith(ch.name, {