diff options
Diffstat (limited to 'app/serializers/rest/instance_serializer.rb')
-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 cab05e60a..41ed1995d 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, :description, :email, :version, :urls, :stats, :thumbnail, :max_toot_chars, - :languages + :languages, :registrations has_one :contact_account, serializer: REST::AccountSerializer @@ -55,6 +55,10 @@ class REST::InstanceSerializer < ActiveModel::Serializer [I18n.default_locale] end + def registrations + Setting.open_registrations && !Rails.configuration.x.single_user_mode + end + private def instance_presenter |