1
0
mirror of https://github.com/funamitech/mastodon synced 2024-12-27 04:59:15 +09:00
YuruToot/app/serializers/rest/encrypted_message_serializer.rb

20 lines
363 B
Ruby
Raw Normal View History

2020-06-03 02:24:53 +09:00
# frozen_string_literal: true
class REST::EncryptedMessageSerializer < ActiveModel::Serializer
attributes :id, :account_id, :device_id,
:type, :body, :digest, :message_franking,
:created_at
2020-06-03 02:24:53 +09: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