Remove `max_toot_chars` from initial-state

This is still in `/api/v1/instance` for compatibility with other clients
shrike
Claire 2024-02-24 13:58:00 +01:00
parent 6da69967d0
commit 47b5105e5d
1 changed files with 1 additions and 5 deletions

View File

@ -5,7 +5,7 @@ class InitialStateSerializer < ActiveModel::Serializer
attributes :meta, :compose, :accounts, attributes :meta, :compose, :accounts,
:media_attachments, :settings, :media_attachments, :settings,
:max_toot_chars, :max_feed_hashtags, :poll_limits, :max_feed_hashtags, :poll_limits,
:languages :languages
attribute :critical_updates_pending, if: -> { object&.role&.can?(:view_devops) && SoftwareUpdate.check_enabled? } attribute :critical_updates_pending, if: -> { object&.role&.can?(:view_devops) && SoftwareUpdate.check_enabled? }
@ -13,10 +13,6 @@ class InitialStateSerializer < ActiveModel::Serializer
has_one :push_subscription, serializer: REST::WebPushSubscriptionSerializer has_one :push_subscription, serializer: REST::WebPushSubscriptionSerializer
has_one :role, serializer: REST::RoleSerializer has_one :role, serializer: REST::RoleSerializer
def max_toot_chars
StatusLengthValidator::MAX_CHARS
end
def max_feed_hashtags def max_feed_hashtags
TagFeed::LIMIT_PER_MODE TagFeed::LIMIT_PER_MODE
end end