mirror of
https://github.com/yingziwu/mastodon.git
synced 2026-02-25 11:42:43 +00:00
Merge remote-tracking branch 'upstream/master'
This commit is contained in:
commit
71cec2d153
922 changed files with 9431 additions and 4194 deletions
|
|
@ -4,9 +4,8 @@ class REST::InstanceSerializer < ActiveModel::Serializer
|
|||
include RoutingHelper
|
||||
|
||||
attributes :uri, :title, :short_description, :description, :email,
|
||||
:version, :urls, :stats, :thumbnail,
|
||||
:languages, :registrations, :approval_required,
|
||||
:max_toot_chars
|
||||
:version, :urls, :stats, :thumbnail, :max_toot_chars,
|
||||
:languages, :registrations, :approval_required, :invites_enabled
|
||||
|
||||
has_one :contact_account, serializer: REST::AccountSerializer
|
||||
|
||||
|
|
@ -68,6 +67,10 @@ class REST::InstanceSerializer < ActiveModel::Serializer
|
|||
Setting.registrations_mode == 'approved'
|
||||
end
|
||||
|
||||
def invites_enabled
|
||||
Setting.min_invite_role == 'user'
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def instance_presenter
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue