1
0
Fork 0
forked from gitea/nas

Change: 単方向の承認だけでフレンドサーバーが有効になるようにする (#74)

* Test: テストを先に作成

* Fix: テスト不備

* Wip: フレンドサーバーのテストを修正

* Wip: エラーを修正

* 項目のラベリングを修正

* 新しい設定が変更できないのを修正

* Wip: 削除時の処理を修正

* フレンド自動承認設定を削除

* Fix: 申請を受けたドメインのINBOXが空になる問題

* Change: #75 フレンドでないサーバーからのローカル公開を未収載に変換 (#77)
This commit is contained in:
KMY(雪あすか) 2023-10-10 21:46:26 +09:00 committed by GitHub
parent 521932c802
commit 1eb2d78b5d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
24 changed files with 314 additions and 126 deletions

View file

@ -0,0 +1,23 @@
# frozen_string_literal: true
require Rails.root.join('lib', 'mastodon', 'migration_helpers')
class AddDeliveryLocalToFriendDomains < ActiveRecord::Migration[7.0]
include Mastodon::MigrationHelpers
disable_ddl_transaction!
def up
safety_assured do
add_column_with_default :friend_domains, :delivery_local, :boolean, default: true, allow_null: false
remove_column :friend_domains, :unlocked
end
end
def down
safety_assured do
remove_column :friend_domains, :delivery_local
add_column_with_default :friend_domains, :unlocked, :boolean, default: false, allow_null: false
end
end
end

View file

@ -10,7 +10,7 @@
#
# It's strongly recommended that you check this file into your version control system.
ActiveRecord::Schema[7.0].define(version: 2023_10_07_090808) do
ActiveRecord::Schema[7.0].define(version: 2023_10_09_235215) do
# These are extensions that must be enabled in order to support this database
enable_extension "plpgsql"
@ -686,10 +686,10 @@ ActiveRecord::Schema[7.0].define(version: 2023_10_07_090808) do
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.boolean "delivery_local", default: true, 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