# 当有人在您查看未读消息时发帖，聊天会跳过一整块消息

**URL:** <https://meta.discourse.org/t/chat-skips-a-block-of-messages-when-someone-posts-while-youre-catching-up-on-unread-history/416446>\
**Category:** Bug\
**Tags:** chat\
**Created:** [2026 年11 月 3 日 17:21 UTC](https://meta.discourse.org/t/chat-skips-a-block-of-messages-when-someone-posts-while-youre-catching-up-on-unread-history/416446 "2026-11-03T17:21:54Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

作者： ![awesomerobot](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/awesomerobot/32/142900_2.png) [@awesomerobot](https://meta.discourse.org/u/awesomerobot)\
发布日期： [2026 年11 月 3 日 23:40 UTC](https://meta.discourse.org/t/chat-skips-a-block-of-messages-when-someone-posts-while-youre-catching-up-on-unread-history/416446/3 "2026-11-03T23:40:56Z")

</div>

感谢反馈！我能通过你提供的步骤复现该问题，这肯定不是理想状态。

我已在此处添加了修复方案：

> <https://github.com/discourse/discourse/pull/45528>
>
> Reported in: https://meta.discourse.org/t/chat-skips-a-block-of-messages-when-so…meone-posts-while-youre-catching-up-on-unread-history/416446
> 
> When you're scrolled up in the chat history and newer messages haven't been loaded yet, a new message that comes in is added to the end of the partially loaded list. The next page is then requested from that message.
> 
> Because of this, everything between the most recent message you had loaded and the new message is skipped and marked as read, and doesn't show up until you reload the channel. Loading older messages also reset \`canLoadMoreFuture\` to \`null\`, which broke the "new messages below" arrow.
> 
> This change makes \`ChatMessagesLoader\` request the next page from the oldest and newest messages the server has sent, rather than from the ends of what's on screen, so live messages can no longer change where pagination starts. It also only updates the flag for the direction it fetched, so the arrow keeps working.
> 
> While newer history is still unloaded, live messages are now counted on the arrow instead of being added to the list, so they appear in order as you scroll instead of pages loading in above them. If one arrives just after the server built the last page, the loader fetches one more page so it isn't missed.
> 
> 
> Before... note the new message and our count ending at 55 of 96
> 
> 
> https://github.com/user-attachments/assets/b6424498-c158-4410-81d2-717c440d5bb7
> 
> 
> 
> 
> After... we see up to 96 and the new message 
> 
> 
> https://github.com/user-attachments/assets/572153dd-52e2-49f3-b3da-bae740c8757a

此修复将很快随 Discourse 更新推出。

---

_[View the full topic](https://meta.discourse.org/t/chat-skips-a-block-of-messages-when-someone-posts-while-youre-catching-up-on-unread-history/416446)._
