|
|
@ -143,7 +143,9 @@ impl Object for ApubComment {
|
|
|
|
verify_person_in_community(¬e.attributed_to, &community, context).await?;
|
|
|
|
verify_person_in_community(¬e.attributed_to, &community, context).await?;
|
|
|
|
let (post, _) = note.get_parents(context).await?;
|
|
|
|
let (post, _) = note.get_parents(context).await?;
|
|
|
|
let creator = note.attributed_to.dereference(context).await?;
|
|
|
|
let creator = note.attributed_to.dereference(context).await?;
|
|
|
|
let is_mod_or_admin = is_mod_or_admin(&mut context.pool(), creator, community.id)?;
|
|
|
|
let is_mod_or_admin = is_mod_or_admin(&mut context.pool(), &creator, community.id)
|
|
|
|
|
|
|
|
.await
|
|
|
|
|
|
|
|
.is_ok();
|
|
|
|
if post.locked && !is_mod_or_admin {
|
|
|
|
if post.locked && !is_mod_or_admin {
|
|
|
|
Err(LemmyErrorType::PostIsLocked)?
|
|
|
|
Err(LemmyErrorType::PostIsLocked)?
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|