mirror of
https://github.com/mastodon/mastodon
synced 2024-12-02 00:38:20 +09:00
19 lines
337 B
Ruby
19 lines
337 B
Ruby
|
# frozen_string_literal: true
|
||
|
|
||
|
class REST::EncryptedMessageSerializer < ActiveModel::Serializer
|
||
|
attributes :id, :account_id, :device_id,
|
||
|
:type, :body, :digest, :message_franking
|
||
|
|
||
|
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
|