Add streaming_other_servers_emoji_reaction setting
This commit is contained in:
parent
49197bf6c4
commit
366ab12103
7 changed files with 12 additions and 2 deletions
|
@ -111,7 +111,7 @@ class ActivityPub::Activity::Like < ActivityPub::Activity
|
||||||
emoji_group = @original_status.emoji_reactions_grouped_by_name(nil, force: true)
|
emoji_group = @original_status.emoji_reactions_grouped_by_name(nil, force: true)
|
||||||
.find { |reaction_group| reaction_group['name'] == emoji_reaction.name && (!reaction_group.key?(:domain) || reaction_group['domain'] == emoji_reaction.custom_emoji&.domain) }
|
.find { |reaction_group| reaction_group['name'] == emoji_reaction.name && (!reaction_group.key?(:domain) || reaction_group['domain'] == emoji_reaction.custom_emoji&.domain) }
|
||||||
emoji_group['status_id'] = @original_status.id.to_s
|
emoji_group['status_id'] = @original_status.id.to_s
|
||||||
DeliveryEmojiReactionWorker.perform_async(render_emoji_reaction(emoji_group), @original_status.id, emoji_reaction.account_id)
|
DeliveryEmojiReactionWorker.perform_async(render_emoji_reaction(emoji_group), @original_status.id, emoji_reaction.account_id) if @original_status.local? || Setting.streaming_other_servers_emoji_reaction
|
||||||
end
|
end
|
||||||
|
|
||||||
def render_emoji_reaction(emoji_group)
|
def render_emoji_reaction(emoji_group)
|
||||||
|
|
|
@ -149,7 +149,7 @@ class ActivityPub::Activity::Undo < ActivityPub::Activity
|
||||||
emoji_group = { 'name' => emoji_reaction.name, 'count' => 0, 'account_ids' => [], 'status_id' => @original_status.id.to_s }
|
emoji_group = { 'name' => emoji_reaction.name, 'count' => 0, 'account_ids' => [], 'status_id' => @original_status.id.to_s }
|
||||||
emoji_group['domain'] = emoji_reaction.custom_emoji.domain if emoji_reaction.custom_emoji
|
emoji_group['domain'] = emoji_reaction.custom_emoji.domain if emoji_reaction.custom_emoji
|
||||||
end
|
end
|
||||||
DeliveryEmojiReactionWorker.perform_async(render_emoji_reaction(emoji_group), @original_status.id, emoji_reaction.account_id)
|
DeliveryEmojiReactionWorker.perform_async(render_emoji_reaction(emoji_group), @original_status.id, emoji_reaction.account_id) if @original_status.local? || Setting.streaming_other_servers_emoji_reaction
|
||||||
end
|
end
|
||||||
|
|
||||||
def render_emoji_reaction(emoji_group)
|
def render_emoji_reaction(emoji_group)
|
||||||
|
|
|
@ -43,6 +43,7 @@ class Form::AdminSettings
|
||||||
sensitive_words_for_full
|
sensitive_words_for_full
|
||||||
authorized_fetch
|
authorized_fetch
|
||||||
receive_other_servers_emoji_reaction
|
receive_other_servers_emoji_reaction
|
||||||
|
streaming_other_servers_emoji_reaction
|
||||||
enable_emoji_reaction
|
enable_emoji_reaction
|
||||||
).freeze
|
).freeze
|
||||||
|
|
||||||
|
@ -68,6 +69,7 @@ class Form::AdminSettings
|
||||||
hide_local_users_for_anonymous
|
hide_local_users_for_anonymous
|
||||||
authorized_fetch
|
authorized_fetch
|
||||||
receive_other_servers_emoji_reaction
|
receive_other_servers_emoji_reaction
|
||||||
|
streaming_other_servers_emoji_reaction
|
||||||
enable_emoji_reaction
|
enable_emoji_reaction
|
||||||
).freeze
|
).freeze
|
||||||
|
|
||||||
|
|
|
@ -37,6 +37,9 @@
|
||||||
.fields-group
|
.fields-group
|
||||||
= f.input :receive_other_servers_emoji_reaction, as: :boolean, wrapper: :with_label, kmyblue: true
|
= f.input :receive_other_servers_emoji_reaction, as: :boolean, wrapper: :with_label, kmyblue: true
|
||||||
|
|
||||||
|
.fields-group
|
||||||
|
= f.input :streaming_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
|
||||||
|
|
|
@ -107,6 +107,7 @@ en:
|
||||||
site_terms: Use your own privacy policy or leave blank to use the default. Can be structured with Markdown syntax.
|
site_terms: Use your own privacy policy or leave blank to use the default. Can be structured with Markdown syntax.
|
||||||
site_title: How people may refer to your server besides its domain name.
|
site_title: How people may refer to your server besides its domain name.
|
||||||
status_page_url: URL of a page where people can see the status of this server during an outage
|
status_page_url: URL of a page where people can see the status of this server during an outage
|
||||||
|
streaming_other_servers_emoji_reaction: Check your server network capacity. A lot of data streaming.
|
||||||
theme: Theme that logged out visitors and new users see.
|
theme: Theme that logged out visitors and new users see.
|
||||||
thumbnail: A roughly 2:1 image displayed alongside your server information.
|
thumbnail: A roughly 2:1 image displayed alongside your server information.
|
||||||
timeline_preview: Logged out visitors will be able to browse the most recent public posts available on the server.
|
timeline_preview: Logged out visitors will be able to browse the most recent public posts available on the server.
|
||||||
|
@ -330,6 +331,7 @@ en:
|
||||||
site_terms: Privacy Policy
|
site_terms: Privacy Policy
|
||||||
site_title: Server name
|
site_title: Server name
|
||||||
status_page_url: Status page URL
|
status_page_url: Status page URL
|
||||||
|
streaming_other_servers_emoji_reaction: Streaming stamp between other server users
|
||||||
theme: Default theme
|
theme: Default theme
|
||||||
thumbnail: Server thumbnail
|
thumbnail: Server thumbnail
|
||||||
timeline_preview: Allow unauthenticated access to public timelines
|
timeline_preview: Allow unauthenticated access to public timelines
|
||||||
|
|
|
@ -117,6 +117,7 @@ ja:
|
||||||
site_terms: 独自のプライバシーポリシーを使用するか空白にしてデフォルトのプライバシーポリシーを使用します。Markdownが使えます。
|
site_terms: 独自のプライバシーポリシーを使用するか空白にしてデフォルトのプライバシーポリシーを使用します。Markdownが使えます。
|
||||||
site_title: ドメイン名以外でサーバーを参照する方法
|
site_title: ドメイン名以外でサーバーを参照する方法
|
||||||
status_page_url: 障害発生時などにユーザーがサーバーの状態を確認できるページのURL
|
status_page_url: 障害発生時などにユーザーがサーバーの状態を確認できるページのURL
|
||||||
|
streaming_other_servers_emoji_reaction: ストリーミングサーバーの通信許容量、および各ユーザーの通信容量を必ず確認してください。大量のデータが配信されます。
|
||||||
theme: ログインしていない人と新規ユーザーに表示されるテーマ。
|
theme: ログインしていない人と新規ユーザーに表示されるテーマ。
|
||||||
thumbnail: サーバー情報と共に表示される、アスペクト比が約 2:1 の画像。
|
thumbnail: サーバー情報と共に表示される、アスペクト比が約 2:1 の画像。
|
||||||
timeline_preview: ログインしていないユーザーがサーバー上の最新の公開投稿を閲覧できるようにします。
|
timeline_preview: ログインしていないユーザーがサーバー上の最新の公開投稿を閲覧できるようにします。
|
||||||
|
@ -341,6 +342,7 @@ ja:
|
||||||
site_terms: プライバシーポリシー
|
site_terms: プライバシーポリシー
|
||||||
site_title: サーバーの名前
|
site_title: サーバーの名前
|
||||||
status_page_url: ステータスページのURL
|
status_page_url: ステータスページのURL
|
||||||
|
streaming_other_servers_emoji_reaction: 他のサーバーのユーザーが他のサーバーの投稿につけたスタンプをストリーミングする
|
||||||
theme: デフォルトテーマ
|
theme: デフォルトテーマ
|
||||||
thumbnail: サーバーのサムネイル
|
thumbnail: サーバーのサムネイル
|
||||||
timeline_preview: 公開タイムラインへの未認証のアクセスを許可する
|
timeline_preview: 公開タイムラインへの未認証のアクセスを許可する
|
||||||
|
|
|
@ -39,6 +39,7 @@ defaults: &defaults
|
||||||
backups_retention_period: 7
|
backups_retention_period: 7
|
||||||
captcha_enabled: false
|
captcha_enabled: false
|
||||||
receive_other_servers_emoji_reaction: false
|
receive_other_servers_emoji_reaction: false
|
||||||
|
streaming_other_servers_emoji_reaction: false
|
||||||
enable_emoji_reaction: true
|
enable_emoji_reaction: true
|
||||||
|
|
||||||
development:
|
development:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue