This repository has been archived on 2024-07-22. You can view files and clone it, but cannot push or open issues or pull requests.
2020-06-02 10:24:53 -07:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
class REST::EncryptedMessageSerializer < ActiveModel::Serializer
|
|
|
|
attributes :id, :account_id, :device_id,
|
2020-06-03 11:32:15 -07:00
|
|
|
:type, :body, :digest, :message_franking,
|
|
|
|
:created_at
|
2020-06-02 10:24:53 -07:00
|
|
|
|
|
|
|
def id
|
|
|
|
object.id.to_s
|
|
|
|
end
|
|
|
|
|
|
|
|
def account_id
|
|
|
|
object.from_account_id.to_s
|
|
|
|
end
|
|
|
|
|
|
|
|
def device_id
|
|
|
|
object.from_device_id
|
|
|
|
end
|
|
|
|
end
|