diff --git a/yunkes/src/views/ChatTimeline.vue b/yunkes/src/views/ChatTimeline.vue index 20bd1b6..33ee895 100644 --- a/yunkes/src/views/ChatTimeline.vue +++ b/yunkes/src/views/ChatTimeline.vue @@ -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, }