From 19857a77f1c70e83c89846f091ffb11502dd8cef Mon Sep 17 00:00:00 2001 From: asonix Date: Thu, 26 Mar 2020 14:42:11 -0500 Subject: [PATCH] Unblock everyone, oops --- src/data/state.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/data/state.rs b/src/data/state.rs index 0f55eb2..6e8b215 100644 --- a/src/data/state.rs +++ b/src/data/state.rs @@ -88,16 +88,16 @@ impl State { return true; } - if let Some(host) = actor_id.as_url().host() { - self.whitelists.read().await.contains(&host.to_string()); + if let Some(domain) = actor_id.as_url().domain() { + return self.whitelists.read().await.contains(domain); } false } pub async fn is_blocked(&self, actor_id: &XsdAnyUri) -> bool { - if let Some(host) = actor_id.as_url().host() { - self.blocks.read().await.contains(&host.to_string()); + if let Some(domain) = actor_id.as_url().domain() { + return self.blocks.read().await.contains(domain); } true