From 2f398d3ef611c19cbd3e96c9d009d1bc999ac5ae Mon Sep 17 00:00:00 2001 From: Dessalines Date: Tue, 5 Nov 2024 09:49:40 -0500 Subject: [PATCH] Removing pointless local check. --- crates/apub/src/objects/private_message.rs | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/crates/apub/src/objects/private_message.rs b/crates/apub/src/objects/private_message.rs index 365f7c263..f3a9f140c 100644 --- a/crates/apub/src/objects/private_message.rs +++ b/crates/apub/src/objects/private_message.rs @@ -136,13 +136,11 @@ impl Object for ApubPrivateMessage { let recipient = note.to[0].dereference(context).await?; PersonBlock::read(&mut context.pool(), recipient.id, creator.id).await?; - // If its a local user, check that they can receive private messages - if recipient.local { - if let Ok(recipient_local_user) = - LocalUserView::read_person(&mut context.pool(), recipient.id).await - { - check_private_messages_enabled(&recipient_local_user)?; - } + // Check that they can receive private messages + if let Ok(recipient_local_user) = + LocalUserView::read_person(&mut context.pool(), recipient.id).await + { + check_private_messages_enabled(&recipient_local_user)?; } let local_site = LocalSite::read(&mut context.pool()).await.ok(); let slur_regex = &local_site_opt_to_slur_regex(&local_site);