Removing pointless local check.

This commit is contained in:
Dessalines 2024-11-05 09:49:40 -05:00
parent 0e9ea4df9d
commit 2f398d3ef6

View file

@ -136,13 +136,11 @@ impl Object for ApubPrivateMessage {
let recipient = note.to[0].dereference(context).await?; let recipient = note.to[0].dereference(context).await?;
PersonBlock::read(&mut context.pool(), recipient.id, creator.id).await?; PersonBlock::read(&mut context.pool(), recipient.id, creator.id).await?;
// If its a local user, check that they can receive private messages // Check that they can receive private messages
if recipient.local { if let Ok(recipient_local_user) =
if let Ok(recipient_local_user) = LocalUserView::read_person(&mut context.pool(), recipient.id).await
LocalUserView::read_person(&mut context.pool(), recipient.id).await {
{ check_private_messages_enabled(&recipient_local_user)?;
check_private_messages_enabled(&recipient_local_user)?;
}
} }
let local_site = LocalSite::read(&mut context.pool()).await.ok(); let local_site = LocalSite::read(&mut context.pool()).await.ok();
let slur_regex = &local_site_opt_to_slur_regex(&local_site); let slur_regex = &local_site_opt_to_slur_regex(&local_site);