fix: 更新打包配置并修复群昵称刷新

更新跨平台 WCDB 和运行时命名。
优化消息获取速度
修复群昵称刷新回退与消息发送者显示,并增加可控的消息读取诊断日志和有界查询优化。
This commit is contained in:
Wxw-Gu authored and 电摇小子 committed 2026-08-25 14:26:29 +08:00
1 parent fc54c3b946
commit 47e0d7cd1e
25 files changed
+415 -148

No files matched your search

+17 -3
View File
@@ -1,4 +1,5 @@
import { Wcdb4Client, Wcdb4MessageQueryOptions } from './wcdb4-client'
import { wcdbDebugLog } from './wcdb-debug'
export interface UserContact {
m_nsUsrName: string
@@ -197,13 +198,26 @@ export class WechatDb {
userMd5: string,
startTime?: number,
endTime?: number,
options?: Wcdb4MessageQueryOptions
options?: Wcdb4MessageQueryOptions,
requestId = 'NO-REQUEST'
): Promise<WechatMessage[]> {
this.ensureChatTableMapping()
const username = this.chatMd5ToUsername.get(userMd5)
if (!username) return []
const messages = await this.wcdb4Client.getMessagesAsync(username, startTime, endTime, options)
return messages.map((message) => ({ ...message.raw, ...message }))
const startedAt = Date.now()
wcdbDebugLog(`[${requestId}] WechatDb getUserMessagesAsync start username=${username}`)
const messages = await this.wcdb4Client.getMessagesAsync(
username,
startTime,
endTime,
options,
requestId
)
const mapped = messages.map((message) => ({ ...message.raw, ...message }))
wcdbDebugLog(
`[${requestId}] WechatDb getUserMessagesAsync end rows=${mapped.length} cost=${Date.now() - startedAt}ms`
)
return mapped
}
public async getUserMessagesForExport(