Remove emoji reaction from fedibird_capabilities and setting pages when disabled
This commit is contained in:
parent
04418d5b01
commit
35c2bb9f44
9 changed files with 20 additions and 40 deletions
|
@ -11,7 +11,7 @@ class REST::InstanceSerializer < ActiveModel::Serializer
|
|||
|
||||
attributes :domain, :title, :version, :source_url, :description,
|
||||
:usage, :thumbnail, :languages, :configuration,
|
||||
:registrations, :fedibird_capabilities, :kmyblue_capabilities
|
||||
:registrations, :fedibird_capabilities
|
||||
|
||||
has_one :contact, serializer: ContactSerializer
|
||||
has_many :rules, serializer: REST::RuleSerializer
|
||||
|
@ -108,7 +108,6 @@ class REST::InstanceSerializer < ActiveModel::Serializer
|
|||
# for third party apps
|
||||
def fedibird_capabilities
|
||||
capabilities = [
|
||||
:emoji_reaction,
|
||||
:kmyblue_visibility_public_unlisted,
|
||||
:enable_wide_emoji,
|
||||
:enable_wide_emoji_reaction,
|
||||
|
@ -126,24 +125,11 @@ class REST::InstanceSerializer < ActiveModel::Serializer
|
|||
]
|
||||
|
||||
capabilities << :profile_search unless Chewy.enabled?
|
||||
capabilities << :emoji_reaction if Setting.enable_emoji_reaction
|
||||
|
||||
capabilities
|
||||
end
|
||||
|
||||
def kmyblue_capabilities
|
||||
%i(
|
||||
visibility_public_unlisted
|
||||
searchability
|
||||
markdown
|
||||
reaction_deck
|
||||
visibility_login
|
||||
limited_scope
|
||||
antenna
|
||||
bookmark_category
|
||||
status_expiration
|
||||
)
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def registrations_enabled?
|
||||
|
|
|
@ -6,7 +6,7 @@ class REST::V1::InstanceSerializer < ActiveModel::Serializer
|
|||
attributes :uri, :title, :short_description, :description, :email,
|
||||
:version, :urls, :stats, :thumbnail,
|
||||
:languages, :registrations, :approval_required, :invites_enabled,
|
||||
:configuration, :fedibird_capabilities, :kmyblue_capabilities
|
||||
:configuration, :fedibird_capabilities
|
||||
|
||||
has_one :contact_account, serializer: REST::AccountSerializer
|
||||
|
||||
|
@ -117,7 +117,6 @@ class REST::V1::InstanceSerializer < ActiveModel::Serializer
|
|||
# for third party apps
|
||||
def fedibird_capabilities
|
||||
capabilities = [
|
||||
:emoji_reaction,
|
||||
:kmyblue_visibility_public_unlisted,
|
||||
:enable_wide_emoji,
|
||||
:enable_wide_emoji_reaction,
|
||||
|
@ -135,24 +134,11 @@ class REST::V1::InstanceSerializer < ActiveModel::Serializer
|
|||
]
|
||||
|
||||
capabilities << :profile_search unless Chewy.enabled?
|
||||
capabilities << :emoji_reaction if Setting.enable_emoji_reaction
|
||||
|
||||
capabilities
|
||||
end
|
||||
|
||||
def kmyblue_capabilities
|
||||
%i(
|
||||
visibility_public_unlisted
|
||||
searchability
|
||||
markdown
|
||||
reaction_deck
|
||||
visibility_login
|
||||
limited_scope
|
||||
antenna
|
||||
bookmark_category
|
||||
status_expiration
|
||||
)
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def instance_presenter
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue