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:
parent
acb29e5b11
commit
87e858a202
66 changed files with 1638 additions and 51 deletions
|
@ -22,6 +22,10 @@ class ActivityPub::DistributionWorker < ActivityPub::RawDistributionWorker
|
|||
@inboxes_for_misskey ||= status_reach_finder.inboxes_for_misskey
|
||||
end
|
||||
|
||||
def inboxes_for_friend
|
||||
@inboxes_for_friend ||= status_reach_finder.inboxes_for_friend
|
||||
end
|
||||
|
||||
def status_reach_finder
|
||||
@status_reach_finder ||= StatusReachFinder.new(@status)
|
||||
end
|
||||
|
@ -34,6 +38,10 @@ class ActivityPub::DistributionWorker < ActivityPub::RawDistributionWorker
|
|||
@payload_for_misskey ||= Oj.dump(serialize_payload(activity_for_misskey, ActivityPub::ActivityForMisskeySerializer, signer: @account))
|
||||
end
|
||||
|
||||
def payload_for_friend
|
||||
@payload_for_friend ||= Oj.dump(serialize_payload(activity_for_friend, ActivityPub::ActivityForFriendSerializer, signer: @account))
|
||||
end
|
||||
|
||||
def activity
|
||||
ActivityPub::ActivityPresenter.from_status(@status)
|
||||
end
|
||||
|
@ -42,6 +50,10 @@ class ActivityPub::DistributionWorker < ActivityPub::RawDistributionWorker
|
|||
ActivityPub::ActivityPresenter.from_status(@status, for_misskey: true)
|
||||
end
|
||||
|
||||
def activity_for_friend
|
||||
ActivityPub::ActivityPresenter.from_status(@status, for_friend: true)
|
||||
end
|
||||
|
||||
def options
|
||||
{ 'synchronize_followers' => @status.private_visibility? }
|
||||
end
|
||||
|
|
|
@ -29,6 +29,12 @@ class ActivityPub::RawDistributionWorker
|
|||
end
|
||||
end
|
||||
|
||||
unless inboxes_for_friend.empty?
|
||||
ActivityPub::DeliveryWorker.push_bulk(inboxes_for_friend, limit: 1_000) do |inbox_url|
|
||||
[payload_for_friend, source_account_id, inbox_url, options]
|
||||
end
|
||||
end
|
||||
|
||||
return if inboxes.empty?
|
||||
|
||||
ActivityPub::DeliveryWorker.push_bulk(inboxes, limit: 1_000) do |inbox_url|
|
||||
|
@ -44,6 +50,10 @@ class ActivityPub::RawDistributionWorker
|
|||
payload
|
||||
end
|
||||
|
||||
def payload_for_friend
|
||||
payload
|
||||
end
|
||||
|
||||
def source_account_id
|
||||
@account.id
|
||||
end
|
||||
|
@ -56,6 +66,10 @@ class ActivityPub::RawDistributionWorker
|
|||
[]
|
||||
end
|
||||
|
||||
def inboxes_for_friend
|
||||
[]
|
||||
end
|
||||
|
||||
def options
|
||||
{}
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue