|
|
@ -5,7 +5,8 @@ class REST::InstanceSerializer < ActiveModel::Serializer |
|
|
|
|
|
|
|
attributes :uri, :title, :short_description, :description, :email, |
|
|
|
:version, :urls, :stats, :thumbnail, |
|
|
|
:languages, :registrations, :approval_required, :invites_enabled |
|
|
|
:languages, :registrations, :approval_required, :invites_enabled, |
|
|
|
:max_toot_chars, :poll_limits |
|
|
|
|
|
|
|
has_one :contact_account, serializer: REST::AccountSerializer |
|
|
|
|
|
|
@ -69,6 +70,19 @@ class REST::InstanceSerializer < ActiveModel::Serializer |
|
|
|
Setting.min_invite_role == 'user' |
|
|
|
end |
|
|
|
|
|
|
|
def max_toot_chars |
|
|
|
5000 |
|
|
|
end |
|
|
|
|
|
|
|
def poll_limits |
|
|
|
{ |
|
|
|
max_options: 10, |
|
|
|
max_expiration: 2592000, |
|
|
|
min_expiration: 300, |
|
|
|
max_option_chars: 50 |
|
|
|
} |
|
|
|
end |
|
|
|
|
|
|
|
private |
|
|
|
|
|
|
|
def instance_presenter |
|
|
|