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. */
|
/** Shared query params for both DM and group timelines. */
|
||||||
function queryFor(pageNum: number) {
|
function queryFor(pageNum: number) {
|
||||||
|
// 日期窗为 both-or-neither:仅当 start/end 同时存在才透传,避免单边过滤
|
||||||
|
// (getMessages→clean() 会逐键剔除 undefined,单边 start 会变成下界过滤)。
|
||||||
|
const hasWindow = windowStart.value != null && windowEnd.value != null
|
||||||
return {
|
return {
|
||||||
channel: channelTyped.value,
|
channel: channelTyped.value,
|
||||||
owner_account_id: props.ownerId,
|
owner_account_id: props.ownerId,
|
||||||
talker_id: isGroup.value ? undefined : props.talkerId,
|
talker_id: isGroup.value ? undefined : props.talkerId,
|
||||||
room_id: isGroup.value ? props.roomId : undefined,
|
room_id: isGroup.value ? props.roomId : undefined,
|
||||||
start: windowStart.value,
|
...(hasWindow ? { start: windowStart.value, end: windowEnd.value } : {}),
|
||||||
end: windowEnd.value,
|
|
||||||
page: pageNum,
|
page: pageNum,
|
||||||
page_size: PAGE_SIZE,
|
page_size: PAGE_SIZE,
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user