Add: #62 ローカルタイムラインを無効にする管理者向け設定 (#179)

* Bump version to 8.0

* Add: 他のサーバーに公開する情報に、制限設定などを追加

* Fix: `quote_of_id`のインデックス

* Fix: #172 他のサーバーからの相乗り絵文字削除が反映されない

* Test: #166 リモートから自分の絵文字を受け取った時、ライセンスが上書きされないことを確認するテスト

* Add: #62 ローカルタイムラインを無効にする管理者設定(内部挙動のみ)

* Add: 画面部分を追加
This commit is contained in:
KMY(雪あすか) 2023-10-27 08:08:50 +09:00 committed by GitHub
parent ae865975d4
commit 1d8862712a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
21 changed files with 238 additions and 16 deletions

View file

@ -130,6 +130,16 @@ RSpec.describe PublicFeed do
it 'includes public_unlisted statuses' do
expect(subject).to include(public_unlisted_status.id)
end
context 'when local timeline is disabled' do
before do
Form::AdminSettings.new(enable_local_timeline: '0').save
end
it 'does not include all statuses' do
expect(subject).to eq []
end
end
end
context 'with a viewer' do
@ -150,6 +160,16 @@ RSpec.describe PublicFeed do
expect(subject).to include(public_unlisted_status.id)
end
end
context 'when local timeline is disabled' do
before do
Form::AdminSettings.new(enable_local_timeline: '0').save
end
it 'does not include all statuses' do
expect(subject).to eq []
end
end
end
context 'with a remote_only option set' do

View file

@ -59,6 +59,12 @@ describe TagFeed, type: :service do
expect(results).to_not include status_tagged_with_cats
end
it 'can restrict to local but local timeline is disabled' do
Form::AdminSettings.new(enable_local_timeline: '0').save
results = described_class.new(tag_cats, nil, any: [tag_dogs.name], local: true).get(20)
expect(results).to_not include status_tagged_with_cats
end
it 'allows replies to be included' do
original = Fabricate(:status)
status = Fabricate(:status, tags: [tag_cats], in_reply_to_id: original.id)