discourse/plugins/chat/app/serializers
Martin Brennan 5f4911dae8
FIX: Channel archive N1 when serializing current user (#19820)
* FIX: Channel archive N1 when serializing current user

The `ChatChannelSerializer` serializes the archive for the
channel if it is present, however this was causing an N1 for
the current user serializer in the case of DM channels, which
were not doing `includes(:chat_channel_archive)` in the
`ChatChannelFetcher`.

DM channels cannot be archived, so we can just never try to serialize
the archive for DM channels in `ChatChannelSerializer`, which
removes the N1.

* DEV: Add N1 performance spec for latest.html preloading

We modify current user serializer in chat, so it's a good
idea to have some N1 performance specs to avoid regressions
here.
2023-01-11 14:39:56 +10:00
..
admin_chat_index_serializer.rb
base_chat_channel_membership_serializer.rb PERF: Stop serializing user in ChatChannelSerializer#current_user_membership (#19527) 2022-12-22 05:30:06 +08:00
chat_channel_index_serializer.rb
chat_channel_search_serializer.rb
chat_channel_serializer.rb FIX: Channel archive N1 when serializing current user (#19820) 2023-01-11 14:39:56 +10:00
chat_in_reply_to_serializer.rb
chat_message_serializer.rb
chat_view_serializer.rb FIX: Add MessageBust.last_id to chat channel subscriptions (#19255) 2022-12-02 10:57:53 +10:00
chat_webhook_event_serializer.rb
direct_message_serializer.rb
incoming_chat_webhook_serializer.rb
reviewable_chat_message_serializer.rb
structured_channel_serializer.rb DEV: moves channel-archive-status to channels subscriptions (#19567) 2022-12-30 15:30:36 +01:00
user_chat_channel_membership_serializer.rb PERF: Stop serializing user in ChatChannelSerializer#current_user_membership (#19527) 2022-12-22 05:30:06 +08:00
user_chat_message_bookmark_serializer.rb
user_with_custom_fields_and_status_serializer.rb