# 我连续发送私信或频道消息时遇到问题

**URL:** <https://meta.discourse.org/t/im-having-issues-sending-dms-or-channel-messages-in-rapid-succession/371991>\
**Category:** Bug\
**Tags:** chat\
**Created:** [2025年六月27日 12:31 UTC](https://meta.discourse.org/t/im-having-issues-sending-dms-or-channel-messages-in-rapid-succession/371991 "2025-06-27T12:31:31Z")\
**Posts on this page:** 1\
**Showing post:** 11

<div class="post-metadata">

**Author:** ![j.jaffeux](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/j.jaffeux/32/60297_2.png) [@j.jaffeux](https://meta.discourse.org/u/j.jaffeux)\
**Post date:** [2025年八月27日 23:26 UTC](https://meta.discourse.org/t/im-having-issues-sending-dms-or-channel-messages-in-rapid-succession/371991/11 "2025-08-27T23:26:01Z")

</div>

我明天会尝试这个：

> <https://github.com/discourse/discourse/pull/34592>
>
> Uses the timestamp at the moment where the user hits send for the created\_at val…ue of the chat message. This should ensure very consistent ordering.
> 
> The implementation is simple:
> \- collects the timestamp and send it in the request (client\_created\_at)
> \- if client\_created\_at is present and valid, set it as created\_at when creating the message
> 
> I suspect that we could end up in a situation where a message is routed to a slower worker and even if sent before an other message could end up being persisted later which would cause ordering issues.

如果进展顺利，我将在本周晚些时候合并它。

---

_[View the full topic](https://meta.discourse.org/t/im-having-issues-sending-dms-or-channel-messages-in-rapid-succession/371991)._
