main ← fix-chat-message-ordering
merged 07:38AM - 13 Oct 26 UTC
Previously, chat saved the sender's device clock as the message `created_at` (#3…4592). Users with a skewed clock had all their messages shifted for everyone, so replies could show above the message they answered ([meta](https://meta.discourse.org/t/388770)), and the `id` pagination cursor skipped those messages.
This change always uses the server time and keeps staged messages after confirmed ones on the client, instead of comparing the two clocks. `Chat::MessagesQuery` now pages on `(created_at, id)`, so messages already stored with a skewed time load again.