discourse/plugins/chat/app/serializers/user_chat_channel_membership_serializer.rb
Roman Rizzi 0a5f548635
DEV: Move discourse-chat to the core repo. (#18776)
As part of this move, we are also renaming `discourse-chat` to `chat`.
2022-11-02 10:41:30 -03:00

19 lines
456 B
Ruby

# frozen_string_literal: true
class UserChatChannelMembershipSerializer < ApplicationSerializer
attributes :following,
:muted,
:desktop_notification_level,
:mobile_notification_level,
:chat_channel_id,
:last_read_message_id,
:unread_count,
:unread_mentions
has_one :user, serializer: BasicUserSerializer, embed: :objects
def user
object.user
end
end