discourse/plugins/chat/spec
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
..
components/chat DEV: Add last_message_id to channel and thread (#22488) 2023-07-13 10:28:11 +10:00
fabricators DEV: Add last_message_id to channel and thread (#22488) 2023-07-13 10:28:11 +10:00
integration DEV: Add last_message_id to channel and thread (#22488) 2023-07-13 10:28:11 +10:00
jobs FIX: Mark threads read when threading enabled for a channel (#22458) 2023-07-06 16:24:56 +10:00
lib FIX: prevents user to restore message deleted by staff (#22571) 2023-07-13 10:16:15 +02:00
mailers DEV: Refactor DM channel creation into new service pattern (#22144) 2023-07-03 10:18:37 +10:00
models DEV: Add last_message_id to channel and thread (#22488) 2023-07-13 10:28:11 +10:00
queries/chat FIX: Better handling of deleted thread original messages (#22402) 2023-07-06 09:47:34 +10:00
requests FIX: created_at datetime format inconsistencies in chat (#22611) 2023-07-14 16:05:01 +10:00
serializer DEV: fixes flakey due to unordered array (#22515) 2023-07-10 17:26:29 +02:00
services FIX: prevents user to restore message deleted by staff (#22571) 2023-07-13 10:16:15 +02:00
support DEV: Add last_message_id to channel and thread (#22488) 2023-07-13 10:28:11 +10:00
system FIX: created_at datetime format inconsistencies in chat (#22611) 2023-07-14 16:05:01 +10:00
validators DEV: properly namespace chat (#20690) 2023-03-17 14:24:38 +01:00
plugin_helper.rb DEV: Refactor DM channel creation into new service pattern (#22144) 2023-07-03 10:18:37 +10:00
plugin_spec.rb DEV: Move user count update for channels to ensure_consistency! (#22321) 2023-07-03 11:41:51 +10:00