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,
|
attributes :domain, :title, :version, :source_url, :description,
|
||||||
:usage, :thumbnail, :languages, :configuration,
|
:usage, :thumbnail, :languages, :configuration,
|
||||||
:registrations, :feature_quote
|
:registrations, :feature_quote, :fedibird_capabilities
|
||||||
|
|
||||||
has_one :contact, serializer: ContactSerializer
|
has_one :contact, serializer: ContactSerializer
|
||||||
has_many :rules, serializer: REST::RuleSerializer
|
has_many :rules, serializer: REST::RuleSerializer
|
||||||
@ -93,8 +93,20 @@ class REST::InstanceSerializer < ActiveModel::Serializer
|
|||||||
}
|
}
|
||||||
end
|
end
|
||||||
|
|
||||||
|
<<<<<<< HEAD
|
||||||
def feature_quote
|
def feature_quote
|
||||||
true
|
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
|
end
|
||||||
|
|
||||||
private
|
private
|
||||||
|
@ -6,7 +6,7 @@ class REST::V1::InstanceSerializer < ActiveModel::Serializer
|
|||||||
attributes :uri, :title, :short_description, :description, :email,
|
attributes :uri, :title, :short_description, :description, :email,
|
||||||
:version, :urls, :stats, :thumbnail,
|
:version, :urls, :stats, :thumbnail,
|
||||||
:languages, :registrations, :approval_required, :invites_enabled,
|
:languages, :registrations, :approval_required, :invites_enabled,
|
||||||
:configuration
|
:configuration, :fedibird_capabilities
|
||||||
|
|
||||||
has_one :contact_account, serializer: REST::AccountSerializer
|
has_one :contact_account, serializer: REST::AccountSerializer
|
||||||
|
|
||||||
@ -98,6 +98,17 @@ class REST::V1::InstanceSerializer < ActiveModel::Serializer
|
|||||||
UserRole.everyone.can?(:invite_users)
|
UserRole.everyone.can?(:invite_users)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
# for third party apps
|
||||||
|
def fedibird_capabilities
|
||||||
|
capabilities = [
|
||||||
|
:emoji_reaction,
|
||||||
|
]
|
||||||
|
|
||||||
|
capabilities << :profile_search unless Chewy.enabled?
|
||||||
|
|
||||||
|
capabilities
|
||||||
|
end
|
||||||
|
|
||||||
private
|
private
|
||||||
|
|
||||||
def instance_presenter
|
def instance_presenter
|
||||||
|
Loading…
Reference in New Issue
Block a user