From: Nutomic Date: Wed, 17 Aug 2022 20:53:19 +0000 (+0000) Subject: Rejected federated pm from blocked users (fixes #2398) (#2408) X-Git-Url: http://these/git/readmes/%24%7B%60data:application/%7BpictrsAvatarThumbnail%28this.props.site.site.icon%29%7D?a=commitdiff_plain;h=c89006c94a4ec5aab2bf387d7605d92a565f8184;p=lemmy.git Rejected federated pm from blocked users (fixes #2398) (#2408) --- diff --git a/crates/apub/src/objects/private_message.rs b/crates/apub/src/objects/private_message.rs index fd3f5135..8a8f9b4a 100644 --- a/crates/apub/src/objects/private_message.rs +++ b/crates/apub/src/objects/private_message.rs @@ -14,7 +14,7 @@ use activitypub_federation::{ utils::verify_domains_match, }; use chrono::NaiveDateTime; -use lemmy_api_common::utils::blocking; +use lemmy_api_common::utils::{blocking, check_person_block}; use lemmy_db_schema::{ source::{ person::Person, @@ -132,6 +132,7 @@ impl ApubObject for ApubPrivateMessage { let recipient = note.to[0] .dereference(context, local_instance(context), request_counter) .await?; + check_person_block(creator.id, recipient.id, context.pool()).await?; let form = PrivateMessageForm { creator_id: creator.id,