Add management of delivery availability in Federation settings (#15771)

* Add management of delivery availavility in Federation settings

* fix translate

* Remove useless object creation

* Fix DeepSource issue

* Add shortcut for all

* Fix DeepSource(skipcq)

* Change 'remove' to 'clear'

* Fix style

* Change class method name (exhausted_deliveries_key_by)
This commit is contained in:
Takeshi Umeda authored and GitHub committed 2021-05-05 23:39:02 +02:00
1 parent d9ae3db8d5
commit 7cb34b32f8
13 files changed
+180 -5

No files matched your search

+3
View File
@@ -10,10 +10,13 @@
class Instance < ApplicationRecord
self.primary_key = :domain
attr_accessor :failure_days
has_many :accounts, foreign_key: :domain, primary_key: :domain
belongs_to :domain_block, foreign_key: :domain, primary_key: :domain
belongs_to :domain_allow, foreign_key: :domain, primary_key: :domain
belongs_to :unavailable_domain, foreign_key: :domain, primary_key: :domain # skipcq: RB-RL1031
scope :matches_domain, ->(value) { where(arel_table[:domain].matches("%#{value}%")) }