1
0
Fork 0
forked from gitea/nas

Fix third party app emoji reaction feature

This commit is contained in:
KMY 2023-02-27 20:17:25 +09:00
parent f812bda850
commit 5c5b42d42c
2 changed files with 24 additions and 2 deletions

View file

@ -11,7 +11,7 @@ class REST::InstanceSerializer < ActiveModel::Serializer
attributes :domain, :title, :version, :source_url, :description,
:usage, :thumbnail, :languages, :configuration,
:registrations
:registrations, :fedibird_capabilities
has_one :contact, serializer: ContactSerializer
has_many :rules, serializer: REST::RuleSerializer
@ -88,6 +88,17 @@ class REST::InstanceSerializer < ActiveModel::Serializer
}
end
# for third party apps
def fedibird_capabilities
capabilities = [
:emoji_reaction,
]
capabilities << :profile_search unless Chewy.enabled?
capabilities
end
private
def registrations_enabled?