discourse/plugins/chat/spec/requests
Martin Brennan 72bbc2fa8a
FIX: created_at datetime format inconsistencies in chat (#22611)
This commit attempts to fix an issue where we are ending
up with bad created_at date formats for last messages, which
is breaking the DM sort order and sometimes causing DM channels
to fall off the list, or show "Invalid date" on mobile.

I have not been able to consistently reproduce these issues
locally, however the serialzier for the channels index uses
MultiJSON.dump() and the Chat::Publisher uses .to_json, both of
which format created_at differently for messages.

The former is `2023-07-05T06:53:25.977Z` (iso8601).

The latter is `2023-07-14 03:59:22 UTC` (.to_s default).

Since we are doing comparison and sorting of these dates on the UI
we need consistent formatting for the JS Date parsers (and moment)
to deal with.

If the issue still occurs after this we can investigate further.
2023-07-14 16:05:01 +10:00
..
admin FEATURE: Export chat messages to CSV file (#22113) 2023-06-21 16:13:36 +04:00
chat FIX: created_at datetime format inconsistencies in chat (#22611) 2023-07-14 16:05:01 +10:00
core_ext DEV: fixes a flakey spec (#20721) 2023-03-17 18:01:19 +01:00
chat_controller_spec.rb DEV: Remove old ChatController routes for messages & lookup (#21723) 2023-05-29 09:37:10 +02:00
direct_messages_controller_spec.rb DEV: Refactor DM channel creation into new service pattern (#22144) 2023-07-03 10:18:37 +10:00
emojis_controller_spec.rb