Add: #699 引用・参照対応サーバーをAPIで取得 (#711)

* Add: #699 引用・参照対応サーバーをAPIで取得

* Complete

* ごめん
This commit is contained in:
KMY(雪あすか) 2024-04-16 12:58:54 +09:00 committed by GitHub
parent 78b2707c08
commit 1c054ed3a3
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
22 changed files with 129 additions and 29 deletions

View file

@ -8,7 +8,8 @@ class REST::AccountSerializer < ActiveModel::Serializer
attributes :id, :username, :acct, :display_name, :locked, :bot, :discoverable, :indexable, :group, :created_at,
:note, :url, :uri, :avatar, :avatar_static, :header, :header_static, :subscribable, :emoji_reaction_available_server,
:followers_count, :following_count, :statuses_count, :last_status_at, :hide_collections, :other_settings, :noindex
:followers_count, :following_count, :statuses_count, :last_status_at, :hide_collections, :other_settings, :noindex,
:server_features
has_one :moved_to_account, key: :moved, serializer: REST::AccountSerializer, if: :moved_and_not_nested?
@ -120,9 +121,11 @@ class REST::AccountSerializer < ActiveModel::Serializer
end
def emoji_reaction_available_server
return Setting.enable_emoji_reaction if object.local?
server_features[:emoji_reaction]
end
InstanceInfo.emoji_reaction_available?(object.domain)
def server_features
InstanceInfo.available_features(object.domain)
end
def moved_to_account