1
0
Fork 0
forked from gitea/nas

Remove: #429 ドメインブロックの「未ログインユーザーに非公開にする」オプション (#430)

This commit is contained in:
KMY(雪あすか) 2024-01-07 16:23:19 +09:00 committed by GitHub
parent 5f144c017c
commit ecf6f31ecd
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 67 additions and 15 deletions

View file

@ -44,7 +44,7 @@ class DomainBlock < ApplicationRecord
delegate :count, to: :accounts, prefix: true
scope :matches_domain, ->(value) { where(arel_table[:domain].matches("%#{value}%")) }
scope :with_user_facing_limitations, -> { where(hidden: false) }
scope :with_user_facing_limitations, -> { where(hidden: false, hidden_anonymous: false) }
scope :with_limitations, lambda {
where(severity: [:silence, :suspend])
.or(where(reject_media: true))