Skip to content

Commit

Permalink
Rejected federated pm from blocked users (fixes #2398) (#2408)
Browse files Browse the repository at this point in the history
  • Loading branch information
Nutomic authored and dessalines committed Sep 13, 2022
1 parent d68669d commit 90b704f
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 @@ -6,7 +6,7 @@ use crate::{
},
};
use chrono::NaiveDateTime;
use lemmy_api_common::utils::blocking;
use lemmy_api_common::utils::{blocking, check_person_block};
use lemmy_apub_lib::{
object_id::ObjectId,
traits::ApubObject,
Expand Down Expand Up @@ -133,6 +133,7 @@ impl ApubObject for ApubPrivateMessage {
let recipient = note.to[0]
.dereference(context, context.client(), 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 90b704f

Please sign in to comment.