Add receive_other_servers_emoji_reaction setting

This commit is contained in:
KMY 2023-09-13 07:10:30 +09:00
parent 503a24967d
commit 8c437a4332
6 changed files with 13 additions and 1 deletions

View file

@ -7,7 +7,7 @@ class ActivityPub::Activity::Like < ActivityPub::Activity
def perform def perform
@original_status = status_from_uri(object_uri) @original_status = status_from_uri(object_uri)
return if @original_status.nil? || !@original_status.account.local? || delete_arrived_first?(@json['id']) || reject_favourite? return if @original_status.nil? || delete_arrived_first?(@json['id']) || reject_favourite?
if shortcode.nil? if shortcode.nil?
process_favourite process_favourite
@ -32,6 +32,8 @@ class ActivityPub::Activity::Like < ActivityPub::Activity
end end
def process_emoji_reaction def process_emoji_reaction
return if !@original_status.account.local? && !Setting.receive_other_servers_emoji_reaction
if emoji_tag.present? if emoji_tag.present?
return if emoji_tag['id'].blank? || emoji_tag['name'].blank? || emoji_tag['icon'].blank? || emoji_tag['icon']['url'].blank? return if emoji_tag['id'].blank? || emoji_tag['name'].blank? || emoji_tag['icon'].blank? || emoji_tag['icon']['url'].blank?

View file

@ -42,6 +42,7 @@ class Form::AdminSettings
sensitive_words sensitive_words
sensitive_words_for_full sensitive_words_for_full
authorized_fetch authorized_fetch
receive_other_servers_emoji_reaction
).freeze ).freeze
INTEGER_KEYS = %i( INTEGER_KEYS = %i(
@ -65,6 +66,7 @@ class Form::AdminSettings
captcha_enabled captcha_enabled
hide_local_users_for_anonymous hide_local_users_for_anonymous
authorized_fetch authorized_fetch
receive_other_servers_emoji_reaction
).freeze ).freeze
UPLOAD_KEYS = %i( UPLOAD_KEYS = %i(

View file

@ -29,6 +29,9 @@
.fields-group .fields-group
= f.input :noindex, as: :boolean, wrapper: :with_label, label: t('admin.settings.default_noindex.title'), hint: t('admin.settings.default_noindex.desc_html') = f.input :noindex, as: :boolean, wrapper: :with_label, label: t('admin.settings.default_noindex.title'), hint: t('admin.settings.default_noindex.desc_html')
.fields-group
= f.input :receive_other_servers_emoji_reaction, as: :boolean, wrapper: :with_label, kmyblue: true
%h4= t('admin.settings.discovery.publish_statistics') %h4= t('admin.settings.discovery.publish_statistics')
.fields-group .fields-group

View file

@ -98,6 +98,7 @@ en:
media_cache_retention_period: Downloaded media files will be deleted after the specified number of days when set to a positive value, and re-downloaded on demand. media_cache_retention_period: Downloaded media files will be deleted after the specified number of days when set to a positive value, and re-downloaded on demand.
peers_api_enabled: A list of domain names this server has encountered in the fediverse. No data is included here about whether you federate with a given server, just that your server knows about it. This is used by services that collect statistics on federation in a general sense. peers_api_enabled: A list of domain names this server has encountered in the fediverse. No data is included here about whether you federate with a given server, just that your server knows about it. This is used by services that collect statistics on federation in a general sense.
profile_directory: The profile directory lists all users who have opted-in to be discoverable. profile_directory: The profile directory lists all users who have opted-in to be discoverable.
receive_other_servers_emoji_reaction: It can cause load. It is recommended to enable it only when there are few people.
require_invite_text: When sign-ups require manual approval, make the “Why do you want to join?” text input mandatory rather than optional require_invite_text: When sign-ups require manual approval, make the “Why do you want to join?” text input mandatory rather than optional
site_contact_email: How people can reach you for legal or support inquiries. site_contact_email: How people can reach you for legal or support inquiries.
site_contact_username: How people can reach you on Mastodon. site_contact_username: How people can reach you on Mastodon.
@ -317,6 +318,7 @@ en:
media_cache_retention_period: Media cache retention period media_cache_retention_period: Media cache retention period
peers_api_enabled: Publish list of discovered servers in the API peers_api_enabled: Publish list of discovered servers in the API
profile_directory: Enable profile directory profile_directory: Enable profile directory
receive_other_servers_emoji_reaction: Receive stamp between other server users
registrations_mode: Who can sign-up registrations_mode: Who can sign-up
require_invite_text: Require a reason to join require_invite_text: Require a reason to join
show_domain_blocks: Show domain blocks show_domain_blocks: Show domain blocks

View file

@ -108,6 +108,7 @@ ja:
media_cache_retention_period: 正の値に設定されている場合、ダウンロードされたメディアファイルは指定された日数の後に削除され、リクエストに応じて再ダウンロードされます。 media_cache_retention_period: 正の値に設定されている場合、ダウンロードされたメディアファイルは指定された日数の後に削除され、リクエストに応じて再ダウンロードされます。
peers_api_enabled: このサーバーが Fediverse で遭遇したドメイン名のリストです。このサーバーが知っているだけで、特定のサーバーと連合しているかのデータは含まれません。これは一般的に Fediverse に関する統計情報を収集するサービスによって使用されます。 peers_api_enabled: このサーバーが Fediverse で遭遇したドメイン名のリストです。このサーバーが知っているだけで、特定のサーバーと連合しているかのデータは含まれません。これは一般的に Fediverse に関する統計情報を収集するサービスによって使用されます。
profile_directory: ディレクトリには、掲載する設定をしたすべてのユーザーが一覧表示されます。 profile_directory: ディレクトリには、掲載する設定をしたすべてのユーザーが一覧表示されます。
receive_other_servers_emoji_reaction: 負荷の原因になります。人が少ない場合にのみ有効にすることをおすすめします。
require_invite_text: アカウント登録が承認制の場合、登録の際の申請事由の入力を必須にします require_invite_text: アカウント登録が承認制の場合、登録の際の申請事由の入力を必須にします
site_contact_email: 法律またはサポートに関する問い合わせ先 site_contact_email: 法律またはサポートに関する問い合わせ先
site_contact_username: マストドンでの連絡方法 site_contact_username: マストドンでの連絡方法
@ -328,6 +329,7 @@ ja:
media_cache_retention_period: メディアキャッシュの保持期間 media_cache_retention_period: メディアキャッシュの保持期間
peers_api_enabled: 発見したサーバーのリストをAPIで公開する peers_api_enabled: 発見したサーバーのリストをAPIで公開する
profile_directory: ディレクトリを有効にする profile_directory: ディレクトリを有効にする
receive_other_servers_emoji_reaction: 他のサーバーのユーザーが他のサーバーの投稿につけたスタンプを受け入れる
registrations_mode: 新規登録が可能な人 registrations_mode: 新規登録が可能な人
require_invite_text: 申請事由の入力を必須にする require_invite_text: 申請事由の入力を必須にする
show_domain_blocks: ドメインブロックを表示 show_domain_blocks: ドメインブロックを表示

View file

@ -38,6 +38,7 @@ defaults: &defaults
require_invite_text: false require_invite_text: false
backups_retention_period: 7 backups_retention_period: 7
captcha_enabled: false captcha_enabled: false
receive_other_servers_emoji_reaction: false
development: development:
<<: *defaults <<: *defaults