* Add person name to PersonIsBannedFromSite error (#3786)
* Log PersonId instead of Person name (#3850)
* Log actor_id for PersonIsBannedFromSite (#3850)
---------
Co-authored-by: Freek van Zee <freek.van.zee@mediamonks.com>
) -> 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;
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(())
}
InvalidQuery,
ObjectNotLocal,
PostIsLocked,
- PersonIsBannedFromSite,
+ PersonIsBannedFromSite(String),
InvalidVoteValue,
PageDoesNotSpecifyCreator,
PageDoesNotSpecifyGroup,