From 6840a77711b2d536b9227b5a96ec565117d80205 Mon Sep 17 00:00:00 2001 From: ThibG Date: Mon, 18 Feb 2019 14:59:19 +0100 Subject: Add domain search/filter to the "Federation" (/admin/instances) page (#10071) --- app/models/instance_filter.rb | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'app/models/instance_filter.rb') diff --git a/app/models/instance_filter.rb b/app/models/instance_filter.rb index 3483d8cd6..848fff53e 100644 --- a/app/models/instance_filter.rb +++ b/app/models/instance_filter.rb @@ -9,9 +9,13 @@ class InstanceFilter def results if params[:limited].present? - DomainBlock.order(id: :desc) + scope = DomainBlock + scope = scope.matches_domain(params[:by_domain]) if params[:by_domain].present? + scope.order(id: :desc) else - Account.remote.by_domain_accounts + scope = Account.remote + scope = scope.matches_domain(params[:by_domain]) if params[:by_domain].present? + scope.by_domain_accounts end end end -- cgit