mirror of
https://wget.la/https://github.com/Wxw-Gu/WechatExplorer
synced 2026-12-01 01:05:30 +08:00
feat(wecom): 支持企业微信插件会话的消息读取与检索
企业微信插件(Mac 微信 4.2)的群 @qy_g 与会话 @qy_u 消息落在 biz_message_*.db,群/成员元数据落在 bizchat/bizchat.db,而原实现 只把 gh_ 前缀路由到 biz_message_*.db,其余一律读 message_*.db, 导致这些会话在档案/会话列表/搜索中完全缺失。 核心改动: - wcdb4-client: isBizSession/isEnterpriseSession 判定;getMessageDatabasePaths 把 @qy_g/@qy_u 路由到 biz_message_*.db;企业会话跳过本库 Name2Id 联表 - wcdb4-client: parseEnterpriseSource 从 zstd 压缩的 source XML enterprise_info 解析 sender/nickname/bizchat_id - wcdb4-client: hydrateEnterpriseGroupNamesAsync 从 bizchat.chat_group 注入群名 - wcdb4-client: getEnterpriseGroupMembers(Async) 从 chat_group.user_list + user_info.user_name 构建成员列表 - message-parser: 企业图片 <img> 无 md5 但有 aeskey,按 aeskey 补判图片类型 - shared/wechat-identities: isGroupSession/isEnterpriseSession 统一判定 - chat-service/wechat-db/index/local-agent-api/agent-group-report/knowledge-search: 读取与展示链路改用 isGroupSession,覆盖会话列表、群快照、群成员统计、 群日报、知识检索、撤回归档映射 - .gitignore: 排除诊断产物、数据库快照、密钥派生脚本与消息正文 blob 只读改造,未触及发送/插入/退群监控/语音转写/群管理等写入链路。 普通微信好友、@chatroom 群、gh_ 公众号行为保持不变。 验证:4 个 @qy_g 群 + 2 个 @qy_u 单聊可读;chatlog/query-search/ group_snapshot/member-stats 全通过;typecheck:node EXIT=0。
This commit is contained in:
1 parent
518a9662a7
commit
eac16ad8a7
10 files changed
+347
-29
No files matched your search
@@ -8,6 +8,7 @@ import {
|
||||
type AutomationRuleType
|
||||
} from '../../shared/automation'
|
||||
import { resolveContact } from './contact-resolution-service'
|
||||
import { isGroupSession } from '../../shared/wechat-identities'
|
||||
import { validateAutomationDraftShape } from '../../shared/agent-api/automation-validation'
|
||||
import type {
|
||||
AgentAutomationExecution,
|
||||
@@ -459,7 +460,7 @@ export class LocalAgentApiService {
|
||||
if (contact.type !== 'group') {
|
||||
throw new LocalAgentApiError(422, 'NOT_GROUP_CONVERSATION', 'conversationId 不是群会话')
|
||||
}
|
||||
if (!contact.m_nsUsrName.endsWith('@chatroom')) {
|
||||
if (!isGroupSession(contact.m_nsUsrName)) {
|
||||
throw new LocalAgentApiError(422, 'NOT_GROUP_CONVERSATION', 'conversationId 不是有效的群会话 ID')
|
||||
}
|
||||
if (!this.deps.getGroupMemberStats) {
|
||||
|
||||
Reference in new issue
Block a user