mirror of
https://wget.la/https://github.com/Wxw-Gu/WechatExplorer
synced 2026-12-01 01:05:30 +08:00
feat: 修复定时日报错误通知微信机器人功能
增加定时日报debug 修复定时日报历史头像显示并区分定时日报标题
This commit is contained in:
1 parent
1c8bbae1f0
commit
7c8b45a24a
32 files changed
+2975
-213
No files matched your search
@@ -122,6 +122,7 @@ import type {
|
||||
ScheduledReportCreateInput,
|
||||
ScheduledReportUpdateInput
|
||||
} from '../shared/scheduled-report'
|
||||
import { isTruthyDebugFlag } from '../shared/debug-flags'
|
||||
import { TextToSpeechSettingsService } from './services/text-to-speech-settings-service'
|
||||
import type {
|
||||
ListTextToSpeechVoicesRequest,
|
||||
@@ -1315,6 +1316,12 @@ app.whenReady().then(async () => {
|
||||
ipcMain.handle('scheduled-report:listExecutions', (_, taskId?: string) =>
|
||||
scheduledReportService.listExecutions(taskId)
|
||||
)
|
||||
ipcMain.handle('scheduled-report:getNotificationSettings', () =>
|
||||
scheduledReportService.getNotificationSettings()
|
||||
)
|
||||
ipcMain.handle('scheduled-report:setNotificationEnabled', (_, enabled: boolean) =>
|
||||
scheduledReportService.setNotificationEnabled(Boolean(enabled))
|
||||
)
|
||||
ipcMain.handle('scheduled-report:create', (_, request: ScheduledReportCreateInput) =>
|
||||
scheduledReportService.createTask(request)
|
||||
)
|
||||
@@ -1332,6 +1339,18 @@ app.whenReady().then(async () => {
|
||||
ipcMain.handle('scheduled-report:runNow', (_, taskId: string) =>
|
||||
scheduledReportService.runScheduledReportNow(taskId)
|
||||
)
|
||||
ipcMain.handle('scheduled-report:retrySend', (_, executionId: string) =>
|
||||
scheduledReportService.retryScheduledReportSend(executionId)
|
||||
)
|
||||
ipcMain.handle('scheduled-report:testErrorNotification', (_, taskId: string) => {
|
||||
if (!isTruthyDebugFlag(import.meta.env.VITE_SCHEDULED_REPORT_DEBUG)) {
|
||||
return Promise.resolve({
|
||||
success: false,
|
||||
error: '调试测试按钮未开启,请在 .env 中设置 VITE_SCHEDULED_REPORT_DEBUG=true。'
|
||||
})
|
||||
}
|
||||
return scheduledReportService.testScheduledReportErrorNotification(taskId)
|
||||
})
|
||||
|
||||
ipcMain.handle('report:reveal', async (_, filePath: string) => {
|
||||
try {
|
||||
|
||||
Reference in new issue
Block a user