Add: フレンドサーバー (#61)

* Fix mastodon version

* テーブル作成

* Wip: フレンドサーバーフォローの承認を受信

* Wip: フレンド申請拒否を受信

* Wip: フォローリクエストを受理

* Wip: 相手からのフォロー・アンフォローを受理

* 普通のフォローとフレンドサーバーのフォローを区別するテストを追加

* ドメインブロックによるフォロー拒否

* ドメインブロックしたあと、申請中のフォロリクを取り下げる処理

* スタブに条件を追加

* Wip: 相手からのDelete信号に対応

* DB定義が消えていたので修正

* Wip: ローカル公開投稿をフレンドに送信する処理など

* Wip: 未収載+誰でもの投稿をフレンドに送る設定

* Wip: ローカル公開をそのまま送信する設定を考慮

* Fix test

* Wip: 他サーバーからのローカル公開投稿の受け入れ

* Wip: Web画面作成

* Fix test

* Wip: ローカル公開を連合TLに流す

* Wip: フレンドサーバーの削除ボタン

* Wip: メール通知や設定のテストなど

* Wip: 翻訳を作成

* Fix: 却下されたあとフォローボタンが表示されない問題

* Wip: 編集できない問題

* 有効にしていないフレンドサーバーをリストで無効表示
This commit is contained in:
KMY(雪あすか) 2023-10-09 11:51:15 +09:00 committed by GitHub
parent acb29e5b11
commit 87e858a202
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
66 changed files with 1638 additions and 51 deletions

View file

@ -426,6 +426,8 @@ en:
public_comment_hint: Comment about this domain limitation for the general public, if advertising the list of domain limitations is enabled.
reject_favourite: Reject favorites
reject_favourite_hint: Reject favorites or emoji-reaction in the future
reject_friend: Reject friend server applications
reject_friend_hint: Reject friend server application in the future
reject_hashtag: Reject hashtags
reject_hashtag_hint: Reject hashtags in the future
reject_media: Reject media files
@ -497,6 +499,35 @@ en:
suppressed: Suppressed
title: Follow recommendations
unsuppress: Restore follow recommendation
friend_servers:
accept: Accept
active_status: My status
add_new: Add and make a new application
delete: Delete
description_html: <strong>フレンドサーバー</strong>とは、お互いのローカル公開・ローカル検索許可の投稿をそのまま交換するシステムです。
disabled: Disabled
domain: Domain
edit:
allow_all_posts: Receive all posts
available: Available
description: フレンドサーバーは、登録と同時に相手方のサーバーへ申請されます。
domain: Domain
inbox_url: Friend server inbox URL
inbox_url_hint: Default value is https://domain/inbox if you input empty (For example, https://example.com/inbox)
pseudo_relay: Send all public or searchable posts
unlocked: Approve automatically receiving new request
edit_friend: Edit
enabled: Enabled
follow: Request
passive_status: Partner status
pending: Pending
reject: Reject
save_and_enable: Save and enable
setup: Add and make a new application
signatures_not_enabled: セキュアモードまたは連合制限モードが有効の場合、フレンドサーバーの動作を確認していないため正常に動作しない可能性があります
status: Status
title: Friend server
unfollow: Cancel request
instances:
availability:
description_html:
@ -520,6 +551,7 @@ en:
limited_federation_mode_description_html: You can chose whether to allow federation with this domain.
policies:
reject_favourite: Reject favorite
reject_friend: Reject friend server application
reject_hashtag: Reject hashtags
reject_media: Reject media
reject_new_follow: Reject follows
@ -810,6 +842,7 @@ en:
discovery:
emoji_reactions: Stamp
follow_recommendations: Follow recommendations
friend_servers: Friend servers
preamble: Surfacing interesting content is instrumental in onboarding new users who may not know anyone Mastodon. Control how various discovery features work on your server.
profile_directory: Profile directory
public_timelines: Public timelines
@ -1050,6 +1083,9 @@ en:
new_pending_account:
body: The details of the new account are below. You can approve or reject this application.
subject: New account up for review on %{instance} (%{username})
new_pending_friend_server:
body: The new friend server %{domain} is waiting for your review. You can approve or reject this application.
subject: New friend server up for review on %{instance} (%{domain})
new_report:
body: "%{reporter} has reported %{target}"
body_remote: Someone from %{domain} has reported %{target}

View file

@ -422,6 +422,8 @@ ja:
public_comment_hint: ドメインブロックの公開を有効にしている場合、このコメントも公開されます。
reject_favourite: お気に入り、スタンプを拒否
reject_favourite_hint: 今後のお気に入り、スタンプを拒否します。停止とは無関係です
reject_friend: フレンドサーバー申請を拒否
reject_friend_hint: 今後のフレンドサーバー申請を全て拒否します。停止とは無関係です
reject_hashtag: ハッシュタグを拒否
reject_hashtag_hint: ハッシュタグで検索できなくなり、トレンドにも影響しなくなります。停止とは無関係です
reject_media: メディアファイルを拒否
@ -492,6 +494,35 @@ ja:
suppressed: 非表示
title: おすすめフォロー
unsuppress: おすすめフォローを復元
friend_servers:
accept: 相手の申請を承認する
active_status: 自分の状態
add_new: フレンドサーバーを追加・申請
delete: 削除
description_html: <strong>フレンドサーバー</strong>とは、お互いのローカル公開・ローカル検索許可の投稿をそのまま交換するシステムです。
disabled: 無効
domain: ドメイン
edit:
allow_all_posts: このサーバーからの全ての投稿を受け入れる
available: 有効にする
description: フレンドサーバーは、登録と同時に相手方のサーバーへ申請されます。
domain: ドメイン
inbox_url: フレンドサーバーの inbox URL
inbox_url_hint: 空欄にした場合、自動で「https://ドメイン名/inbox」に設定されます。https://example.com/inbox相手のサーバーがinbox URLを特別に指定している場合、入力してください。
pseudo_relay: 全ての公開・ローカル公開・非収載かつ検索可能な投稿を送信する
unlocked: このサーバーからの申請を自動で承認する
edit_friend: 編集
enabled: 有効
follow: こちらから申請する
passive_status: 相手の状態
pending: 承認待ち
reject: 相手からの申請を却下する
save_and_enable: 保存して有効にする
setup: フレンドサーバーを追加・申請
signatures_not_enabled: セキュアモードまたは連合制限モードが有効の場合、フレンドサーバーの動作を確認していないため正常に動作しない可能性があります
status: ステータス
title: フレンドサーバー
unfollow: こちらの申請を取り消す
instances:
availability:
description_html:
@ -514,6 +545,7 @@ ja:
policies:
detect_invalid_subscription: 購読のプライバシーなし
reject_favourite: お気に入りを拒否
reject_friend: フレンドサーバー申請を拒否
reject_hashtag: ハッシュタグを拒否
reject_media: メディアを拒否する
reject_new_follow: 新規フォローを拒否
@ -807,6 +839,7 @@ ja:
discovery:
emoji_reactions: スタンプ
follow_recommendations: おすすめフォロー
friend_servers: フレンドサーバー
preamble: Mastodon を知らないユーザーを取り込むには、興味深いコンテンツを浮上させることが重要です。サーバー上で様々なディスカバリー機能がどのように機能するかを制御します。
profile_directory: ディレクトリ
public_timelines: 公開タイムライン
@ -1043,6 +1076,9 @@ ja:
new_pending_account:
body: 新しいアカウントの詳細は以下の通りです。この申請を承認または却下することができます。
subject: '%{instance}で新しいアカウント (%{username}) が承認待ちです'
new_pending_friend_server:
body: 新しいフレンドサーバー %{domain} の申請が届いています。この申請を承認または却下することができます。
subject: '%{instance}で新しいフレンドサーバー (%{domain}) が承認待ちです'
new_report:
body: "%{reporter}さんが%{target}さんを通報しました"
body_remote: "%{domain}の誰かが%{target}さんを通報しました"

View file

@ -354,6 +354,7 @@ en:
trendable_by_default: Allow trends without prior review
trends: Enable trends
trends_as_landing_page: Use trends as the landing page
unlocked_friend: Accept all friend server follows automatically
interactions:
must_be_follower: Block notifications from non-followers
must_be_following: Block notifications from people you don't follow
@ -378,6 +379,7 @@ en:
follow_request: Someone requested to follow you
mention: Someone mentioned you
pending_account: New account needs review
pending_friend_server: New friend server needs review
reblog: Someone boosted your post
report: New report is submitted
software_updates:

View file

@ -369,6 +369,7 @@ ja:
trendable_by_default: 審査前のトレンドの掲載を許可する
trends: トレンドを有効にする
trends_as_landing_page: 新規登録画面にトレンドを表示する
unlocked_friend: 全てのフレンドサーバー申請を自動承認する
interactions:
must_be_follower: フォロワー以外からの通知をブロック
must_be_following: フォローしていないユーザーからの通知をブロック
@ -393,6 +394,7 @@ ja:
follow_request: フォローリクエストを受けた時
mention: 返信が来た時
pending_account: 新しいアカウントの承認が必要な時
pending_friend_server: 新しいフレンドサーバーの承認が必要な時
reblog: 投稿がブーストされた時
report: 新しい通報が送信された時
software_updates:

View file

@ -66,6 +66,7 @@ SimpleNavigation::Configuration.run do |navigation|
s.item :custom_emojis, safe_join([fa_icon('smile-o fw'), t('admin.custom_emojis.title')]), admin_custom_emojis_path, highlights_on: %r{/admin/custom_emojis}, if: -> { current_user.can?(:manage_custom_emojis) }
s.item :webhooks, safe_join([fa_icon('inbox fw'), t('admin.webhooks.title')]), admin_webhooks_path, highlights_on: %r{/admin/webhooks}, if: -> { current_user.can?(:manage_webhooks) }
s.item :relays, safe_join([fa_icon('exchange fw'), t('admin.relays.title')]), admin_relays_path, highlights_on: %r{/admin/relays}, if: -> { !limited_federation_mode? && current_user.can?(:manage_federation) }
s.item :friend_servers, safe_join([fa_icon('users fw'), t('admin.friend_servers.title')]), admin_friend_servers_path, highlights_on: %r{/admin/friend_servers}, if: -> { current_user.can?(:manage_federation) }
end
n.item :sidekiq, safe_join([fa_icon('diamond fw'), 'Sidekiq']), sidekiq_path, link_html: { target: 'sidekiq' }, if: -> { current_user.can?(:view_devops) }

View file

@ -69,6 +69,15 @@ namespace :admin do
end
end
resources :friend_servers, only: [:index, :new, :edit, :create, :update, :destroy] do
member do
post :follow
post :unfollow
post :accept
post :reject
end
end
resources :instances, only: [:index, :show, :destroy], constraints: { id: %r{[^/]+} }, format: 'html' do
member do
post :clear_delivery_errors

View file

@ -43,6 +43,7 @@ defaults: &defaults
enable_emoji_reaction: true
check_lts_version_only: true
enable_public_unlisted_visibility: true
unlocked_friend: false
development:
<<: *defaults