mirror of
https://github.com/hicccc77/WeFlow.git
synced 2026-06-08 07:36:45 +00:00
@@ -1,5 +1,6 @@
|
|||||||
import { parentPort } from 'worker_threads'
|
import { parentPort } from 'worker_threads'
|
||||||
import { wcdbService } from './wcdbService'
|
import { wcdbService } from './wcdbService'
|
||||||
|
import { ConfigService } from './config'
|
||||||
|
|
||||||
|
|
||||||
export interface DualReportMessage {
|
export interface DualReportMessage {
|
||||||
@@ -109,11 +110,12 @@ class DualReportService {
|
|||||||
if (!dbPath) return { success: false, error: '未配置数据库路径' }
|
if (!dbPath) return { success: false, error: '未配置数据库路径' }
|
||||||
if (!decryptKey) return { success: false, error: '未配置解密密钥' }
|
if (!decryptKey) return { success: false, error: '未配置解密密钥' }
|
||||||
|
|
||||||
const cleanedWxid = this.cleanAccountDirName(wxid)
|
const configService = ConfigService.getInstance()
|
||||||
const accountDir = this.configService.getAccountDir(dbPath, wxid)
|
const accountDir = configService.getAccountDir(dbPath, wxid)
|
||||||
if (!accountDir) return { success: false, error: '无法找到账号目录' }
|
if (!accountDir) return { success: false, error: '无法找到账号目录' }
|
||||||
const ok = await wcdbService.open(accountDir, decryptKey)
|
const ok = await wcdbService.open(accountDir, decryptKey)
|
||||||
if (!ok) return { success: false, error: 'WCDB 打开失败' }
|
if (!ok) return { success: false, error: 'WCDB 打开失败' }
|
||||||
|
const cleanedWxid = this.cleanAccountDirName(wxid)
|
||||||
return { success: true, cleanedWxid, rawWxid: wxid }
|
return { success: true, cleanedWxid, rawWxid: wxid }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user