fix(chat): 群聊消息查询不带owner(chat_group按room去重owner被末位员工覆盖,与消息归属错位查空)

room 全局唯一且消息只在单一owner名下(多owner群=0),按room查即正确;
MessageQuery.owner_account_id 改可选。实测43304群6000条正常显示。
16个活跃群0条消息=增量未覆盖,4h调度自动补

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
浅念
2026-08-22 16:50:56 +08:00
parent d08255696c
commit 4f375c3d71
2 changed files with 9 additions and 6 deletions
+2 -1
View File
@@ -76,7 +76,8 @@ export function getCustomers(query: CustomerQuery = {}): Promise<Page<Customer>>
export interface MessageQuery {
channel?: Channel
owner_account_id: string
/** 群聊按 room_id 查时可省略(chat_group owner 与消息 owner 可能错位)。 */
owner_account_id?: string
talker_id?: string
room_id?: string
start?: number