diff --git a/crates/apub/src/activities/mod.rs b/crates/apub/src/activities/mod.rs index bc8379f11..ad04e861f 100644 --- a/crates/apub/src/activities/mod.rs +++ b/crates/apub/src/activities/mod.rs @@ -97,7 +97,9 @@ pub(crate) async fn verify_person_in_community( ) -> Result<(), LemmyError> { let person = person_id.dereference(context).await?; if person.banned { - return Err(LemmyErrorType::PersonIsBannedFromSite)?; + return Err(LemmyErrorType::PersonIsBannedFromSite( + person.actor_id.to_string(), + ))?; } let person_id = person.id; let community_id = community.id; diff --git a/crates/apub/src/objects/private_message.rs b/crates/apub/src/objects/private_message.rs index a51cfe6b7..9a92b0b51 100644 --- a/crates/apub/src/objects/private_message.rs +++ b/crates/apub/src/objects/private_message.rs @@ -107,7 +107,9 @@ impl Object for ApubPrivateMessage { check_apub_id_valid_with_strictness(note.id.inner(), false, context).await?; let person = note.attributed_to.dereference(context).await?; if person.banned { - return Err(LemmyErrorType::PersonIsBannedFromSite)?; + return Err(LemmyErrorType::PersonIsBannedFromSite( + person.actor_id.to_string(), + ))?; } Ok(()) } diff --git a/crates/utils/src/error.rs b/crates/utils/src/error.rs index 9ddd3b293..0dd9ba6cb 100644 --- a/crates/utils/src/error.rs +++ b/crates/utils/src/error.rs @@ -142,7 +142,7 @@ pub enum LemmyErrorType { InvalidQuery, ObjectNotLocal, PostIsLocked, - PersonIsBannedFromSite, + PersonIsBannedFromSite(String), InvalidVoteValue, PageDoesNotSpecifyCreator, PageDoesNotSpecifyGroup,