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
26
db/migrate/20231005074832_create_friend_domains.rb
Normal file
26
db/migrate/20231005074832_create_friend_domains.rb
Normal file
|
@ -0,0 +1,26 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
require Rails.root.join('lib', 'mastodon', 'migration_helpers')
|
||||
|
||||
class CreateFriendDomains < ActiveRecord::Migration[7.0]
|
||||
include Mastodon::MigrationHelpers
|
||||
|
||||
disable_ddl_transaction!
|
||||
|
||||
def change
|
||||
create_table :friend_domains do |t|
|
||||
t.string :domain, null: false, default: '', index: { unique: true }
|
||||
t.string :inbox_url, null: false, default: '', index: { unique: true }
|
||||
t.integer :active_state, null: false, default: 0
|
||||
t.integer :passive_state, null: false, default: 0
|
||||
t.string :active_follow_activity_id, null: true
|
||||
t.string :passive_follow_activity_id, null: true
|
||||
t.boolean :available, null: false, default: true
|
||||
t.boolean :pseudo_relay, null: false, default: false
|
||||
t.boolean :unlocked, null: false, default: false
|
||||
t.boolean :allow_all_posts, null: false, default: true
|
||||
t.datetime :created_at, null: false
|
||||
t.datetime :updated_at, null: false
|
||||
end
|
||||
end
|
||||
end
|
|
@ -0,0 +1,15 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
require Rails.root.join('lib', 'mastodon', 'migration_helpers')
|
||||
|
||||
class AddRejectFriendToDomainBlocks < ActiveRecord::Migration[7.0]
|
||||
include Mastodon::MigrationHelpers
|
||||
|
||||
disable_ddl_transaction!
|
||||
|
||||
def change
|
||||
safety_assured do
|
||||
add_column_with_default :domain_blocks, :reject_friend, :boolean, default: false, allow_null: false
|
||||
end
|
||||
end
|
||||
end
|
18
db/schema.rb
18
db/schema.rb
|
@ -584,6 +584,7 @@ ActiveRecord::Schema[7.0].define(version: 2023_10_07_090808) do
|
|||
t.boolean "hidden_anonymous", default: false, null: false
|
||||
t.boolean "detect_invalid_subscription", default: false, null: false
|
||||
t.boolean "reject_reply_exclude_followers", default: false, null: false
|
||||
t.boolean "reject_friend", default: false, null: false
|
||||
t.index ["domain"], name: "index_domain_blocks_on_domain", unique: true
|
||||
end
|
||||
|
||||
|
@ -676,6 +677,23 @@ ActiveRecord::Schema[7.0].define(version: 2023_10_07_090808) do
|
|||
t.index ["target_account_id"], name: "index_follows_on_target_account_id"
|
||||
end
|
||||
|
||||
create_table "friend_domains", force: :cascade do |t|
|
||||
t.string "domain", default: "", null: false
|
||||
t.string "inbox_url", default: "", null: false
|
||||
t.integer "active_state", default: 0, null: false
|
||||
t.integer "passive_state", default: 0, null: false
|
||||
t.string "active_follow_activity_id"
|
||||
t.string "passive_follow_activity_id"
|
||||
t.boolean "available", default: true, null: false
|
||||
t.boolean "pseudo_relay", default: false, null: false
|
||||
t.boolean "unlocked", default: false, null: false
|
||||
t.boolean "allow_all_posts", default: true, null: false
|
||||
t.datetime "created_at", null: false
|
||||
t.datetime "updated_at", null: false
|
||||
t.index ["domain"], name: "index_friend_domains_on_domain", unique: true
|
||||
t.index ["inbox_url"], name: "index_friend_domains_on_inbox_url", unique: true
|
||||
end
|
||||
|
||||
create_table "identities", force: :cascade do |t|
|
||||
t.string "provider", default: "", null: false
|
||||
t.string "uid", default: "", null: false
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue