Skip to content

Commit

Permalink
Rejected federated pm from blocked users (fixes #2398)
Browse files Browse the repository at this point in the history
  • Loading branch information
Nutomic authored and dessalines committed Aug 17, 2022
1 parent 870abf8 commit a6a7bf2
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion crates/apub/src/objects/private_message.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand Down

0 comments on commit a6a7bf2

Please sign in to comment.