Commit 0bab60af authored by Jyrki's avatar Jyrki 🐾

REST::InstanceSerializer: report max_toot_chars

parent 95d17122
......@@ -5,7 +5,8 @@ class REST::InstanceSerializer < ActiveModel::Serializer
attributes :uri, :title, :short_description, :description, :email,
:version, :urls, :stats, :thumbnail,
:languages, :registrations, :approval_required
:languages, :registrations, :approval_required,
:max_toot_chars
has_one :contact_account, serializer: REST::AccountSerializer
......@@ -63,6 +64,10 @@ class REST::InstanceSerializer < ActiveModel::Serializer
Setting.registrations_mode == 'approved'
end
def max_toot_chars
StatusLengthValidator::MAX_CHARS
end
private
def instance_presenter
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment