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

@ -24,6 +24,9 @@ class BlockDomainService < BaseService
silence_accounts!
elsif domain_block.suspend?
suspend_accounts!
remove_friends!
elsif domain_block.reject_friend?
remove_friends!
end
DomainClearMediaWorker.perform_async(domain_block.id) if domain_block.reject_media?
@ -41,6 +44,10 @@ class BlockDomainService < BaseService
end
end
def remove_friends!
blocked_friends.find_each(&:destroy)
end
def blocked_domain
domain_block.domain
end
@ -48,4 +55,8 @@ class BlockDomainService < BaseService
def blocked_domain_accounts
Account.by_domain_and_subdomains(blocked_domain)
end
def blocked_friends
@blocked_friends ||= FriendDomain.by_domain_and_subdomains(blocked_domain)
end
end