diff options
author | multiple creatures <dev@multiple-creature.party> | 2019-08-30 22:03:46 -0500 |
---|---|---|
committer | multiple creatures <dev@multiple-creature.party> | 2019-08-30 22:03:46 -0500 |
commit | 3b276d268f8e49b897f16f490c78a5a5880c6216 (patch) | |
tree | bcb653e975ab223cf8d048778ab113489bf67b6d /app/models | |
parent | 60c449e1d77c6e11ced796a7e088038d80137de6 (diff) |
use a scheduled task to batch domain policy changes + revert `29643fd6` to avoid accidentally dosing servers when multiple users block a domain
Diffstat (limited to 'app/models')
-rw-r--r-- | app/models/domain_block.rb | 2 | ||||
-rw-r--r-- | app/models/status.rb | 1 |
2 files changed, 3 insertions, 0 deletions
diff --git a/app/models/domain_block.rb b/app/models/domain_block.rb index 7d3b65720..478095cb0 100644 --- a/app/models/domain_block.rb +++ b/app/models/domain_block.rb @@ -13,6 +13,7 @@ # force_sensitive :boolean default(FALSE), not null # reason :text # reject_unknown :boolean default(FALSE), not null +# processing :boolean default(TRUE), not null # class DomainBlock < ApplicationRecord @@ -26,6 +27,7 @@ class DomainBlock < ApplicationRecord delegate :count, to: :accounts, prefix: true scope :matches_domain, ->(value) { where(arel_table[:domain].matches("%#{value}%")) } + scope :unprocessed, -> { where(processing: true) } def self.blocked?(domain) where(domain: domain, severity: :suspend).exists? diff --git a/app/models/status.rb b/app/models/status.rb index 0be747b00..afd25c808 100644 --- a/app/models/status.rb +++ b/app/models/status.rb @@ -31,6 +31,7 @@ # edited :boolean # imported :boolean # origin :string +# tsv :tsvector # boostable :boolean # reject_replies :boolean # |