diff options
author | chr <chr@cybre.space> | 2019-06-23 13:58:33 -0700 |
---|---|---|
committer | chr <chr@cybre.space> | 2021-03-01 21:29:33 -0800 |
commit | b75a99e16b5370a71889be607389676388377a3a (patch) | |
tree | e2bfda272a951c65d591c610383467473bec15d6 /app/serializers/rest | |
parent | 633d175146d6acaf2cc4bfbfcfdee4c85ef20ed1 (diff) |
Feature: 1024-character posts in server and client
Diffstat (limited to 'app/serializers/rest')
-rw-r--r-- | app/serializers/rest/instance_serializer.rb | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/app/serializers/rest/instance_serializer.rb b/app/serializers/rest/instance_serializer.rb index b388e448e..e2aa35c4e 100644 --- a/app/serializers/rest/instance_serializer.rb +++ b/app/serializers/rest/instance_serializer.rb @@ -5,7 +5,7 @@ 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 has_one :contact_account, serializer: REST::AccountSerializer @@ -39,6 +39,10 @@ class REST::InstanceSerializer < ActiveModel::Serializer instance_presenter.thumbnail ? full_asset_url(instance_presenter.thumbnail.file.url) : full_pack_url('media/images/preview.jpg') end + def max_toot_chars + StatusLengthValidator::MAX_CHARS + end + def stats { user_count: instance_presenter.user_count, |