diff --git a/crates/api_crud/src/comment/create.rs b/crates/api_crud/src/comment/create.rs index 8369d1883..e5a869223 100644 --- a/crates/api_crud/src/comment/create.rs +++ b/crates/api_crud/src/comment/create.rs @@ -56,7 +56,9 @@ pub async fn create_comment( check_post_deleted_or_removed(&post)?; // Check if post is locked, no new comments - let is_mod_or_admin = is_mod_or_admin(&mut context.pool(), local_user_view.person, community_id)?; + let is_mod_or_admin = is_mod_or_admin(&mut context.pool(), &local_user_view.person, community_id) + .await + .is_ok(); if post.locked && !is_mod_or_admin { Err(LemmyErrorType::Locked)? } diff --git a/crates/apub/src/objects/comment.rs b/crates/apub/src/objects/comment.rs index f66b6b1f3..6d8d814bf 100644 --- a/crates/apub/src/objects/comment.rs +++ b/crates/apub/src/objects/comment.rs @@ -143,7 +143,9 @@ impl Object for ApubComment { verify_person_in_community(¬e.attributed_to, &community, context).await?; let (post, _) = note.get_parents(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 { Err(LemmyErrorType::PostIsLocked)? } else {