about summary refs log tree commit diff
path: root/app/serializers/rest/conversation_serializer.rb
blob: b09ca63419f30383471f5da4b506893921ba04ec (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
# frozen_string_literal: true

class REST::ConversationSerializer < ActiveModel::Serializer
  attributes :id, :unread

  has_many :participant_accounts, key: :accounts, serializer: REST::AccountSerializer
  has_one :last_status, serializer: REST::StatusSerializer

  def id
    object.id.to_s
  end
end