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/%7B%60%24%7BwebArchiveUrl%7D/save/%24%7BgetStaticDir%28%29%7D/js/static/%24%7Bargs.thread.url%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,