This repository has been archived on 2019-05-14. You can view files and clone it, but cannot push or open issues or pull requests.
mastodon/app/serializers/rest/credential_account_serializer.rb
Yamagishi Kazutoshi f8212da329 Add attribute for default privacy to verify credentials (#4075)
* Add attribute for default privacy to verify credentials

* add raw_note

* source
2017-07-10 03:29:34 +02:00

14 lines
247 B
Ruby

# frozen_string_literal: true
class REST::CredentialAccountSerializer < REST::AccountSerializer
attributes :source
def source
user = object.user
{
privacy: user.setting_default_privacy,
note: object.note,
}
end
end