mirror of
https://github.com/discourse/discourse.git
synced 2025-02-05 19:11:13 +00:00
6bcf558bae
The client already has all the information about the current user so there is no need for us to be serializing the current `User` object each time per channel that is preloaded. In production, profiling shows that this unneeded serializing adds a roughly 5% overhead to a request.
13 lines
355 B
Ruby
13 lines
355 B
Ruby
# frozen_string_literal: true
|
|
|
|
class BaseChatChannelMembershipSerializer < ApplicationSerializer
|
|
attributes :following,
|
|
:muted,
|
|
:desktop_notification_level,
|
|
:mobile_notification_level,
|
|
:chat_channel_id,
|
|
:last_read_message_id,
|
|
:unread_count,
|
|
:unread_mentions
|
|
end
|