Fix third party app emoji reaction feature
This commit is contained in:
parent
d61e7dbdc1
commit
f8ca193b89
@ -11,7 +11,7 @@ class REST::InstanceSerializer < ActiveModel::Serializer
|
||||
|
||||
attributes :domain, :title, :version, :source_url, :description,
|
||||
:usage, :thumbnail, :languages, :configuration,
|
||||
:registrations, :feature_quote
|
||||
:registrations, :feature_quote, :fedibird_capabilities
|
||||
|
||||
has_one :contact, serializer: ContactSerializer
|
||||
has_many :rules, serializer: REST::RuleSerializer
|
||||
@ -93,8 +93,20 @@ class REST::InstanceSerializer < ActiveModel::Serializer
|
||||
}
|
||||
end
|
||||
|
||||
<<<<<<< HEAD
|
||||
def feature_quote
|
||||
true
|
||||
=======
|
||||
# for third party apps
|
||||
def fedibird_capabilities
|
||||
capabilities = [
|
||||
:emoji_reaction,
|
||||
]
|
||||
|
||||
capabilities << :profile_search unless Chewy.enabled?
|
||||
|
||||
capabilities
|
||||
>>>>>>> 5c5b42d42c (Fix third party app emoji reaction feature)
|
||||
end
|
||||
|
||||
private
|
||||
|
@ -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
|
||||
:configuration, :fedibird_capabilities
|
||||
|
||||
has_one :contact_account, serializer: REST::AccountSerializer
|
||||
|
||||
@ -98,6 +98,17 @@ class REST::V1::InstanceSerializer < ActiveModel::Serializer
|
||||
UserRole.everyone.can?(:invite_users)
|
||||
end
|
||||
|
||||
# for third party apps
|
||||
def fedibird_capabilities
|
||||
capabilities = [
|
||||
:emoji_reaction,
|
||||
]
|
||||
|
||||
capabilities << :profile_search unless Chewy.enabled?
|
||||
|
||||
capabilities
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def instance_presenter
|
||||
|
Loading…
Reference in New Issue
Block a user