v0.3.34: 每日汇报增加推送通道选择UI
This commit is contained in:
@@ -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, {
|
||||
|
||||
Reference in New Issue
Block a user