fix(chat): 日期窗 start/end 成对透传(避免单边过滤)
Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -85,13 +85,15 @@ function scrollToBottom(): void {
|
||||
|
||||
/** Shared query params for both DM and group timelines. */
|
||||
function queryFor(pageNum: number) {
|
||||
// 日期窗为 both-or-neither:仅当 start/end 同时存在才透传,避免单边过滤
|
||||
// (getMessages→clean() 会逐键剔除 undefined,单边 start 会变成下界过滤)。
|
||||
const hasWindow = windowStart.value != null && windowEnd.value != null
|
||||
return {
|
||||
channel: channelTyped.value,
|
||||
owner_account_id: props.ownerId,
|
||||
talker_id: isGroup.value ? undefined : props.talkerId,
|
||||
room_id: isGroup.value ? props.roomId : undefined,
|
||||
start: windowStart.value,
|
||||
end: windowEnd.value,
|
||||
...(hasWindow ? { start: windowStart.value, end: windowEnd.value } : {}),
|
||||
page: pageNum,
|
||||
page_size: PAGE_SIZE,
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user