mirror of
https://github.com/LemmyNet/lemmy.git
synced 2024-11-23 15:05:40 +00:00
Rejected federated pm from blocked users (fixes #2398)
This commit is contained in:
parent
870abf8442
commit
a6a7bf2d75
|
@ -14,7 +14,7 @@ use activitypub_federation::{
|
||||||
utils::verify_domains_match,
|
utils::verify_domains_match,
|
||||||
};
|
};
|
||||||
use chrono::NaiveDateTime;
|
use chrono::NaiveDateTime;
|
||||||
use lemmy_api_common::utils::blocking;
|
use lemmy_api_common::utils::{blocking, check_person_block};
|
||||||
use lemmy_db_schema::{
|
use lemmy_db_schema::{
|
||||||
source::{
|
source::{
|
||||||
person::Person,
|
person::Person,
|
||||||
|
@ -132,6 +132,7 @@ impl ApubObject for ApubPrivateMessage {
|
||||||
let recipient = note.to[0]
|
let recipient = note.to[0]
|
||||||
.dereference(context, local_instance(context), request_counter)
|
.dereference(context, local_instance(context), request_counter)
|
||||||
.await?;
|
.await?;
|
||||||
|
check_person_block(creator.id, recipient.id, context.pool()).await?;
|
||||||
|
|
||||||
let form = PrivateMessageForm {
|
let form = PrivateMessageForm {
|
||||||
creator_id: creator.id,
|
creator_id: creator.id,
|
||||||
|
|
Loading…
Reference in a new issue