diff --git a/crates/api_crud/src/post/create.rs b/crates/api_crud/src/post/create.rs index ddadf8c0f..07d577f51 100644 --- a/crates/api_crud/src/post/create.rs +++ b/crates/api_crud/src/post/create.rs @@ -16,7 +16,7 @@ use lemmy_api_common::{ proxy_image_link_opt_apub, EndpointType, }, -};use lemmy_db_views_actor::structs::CommunityModeratorView; +}; use lemmy_db_schema::{ impls::actor_language::default_post_language, source::{ @@ -29,6 +29,7 @@ use lemmy_db_schema::{ CommunityVisibility, }; use lemmy_db_views::structs::LocalUserView; +use lemmy_db_views_actor::structs::CommunityModeratorView; use lemmy_utils::{ error::{LemmyError, LemmyErrorExt, LemmyErrorType}, spawn_try_task, diff --git a/crates/apub/src/objects/post.rs b/crates/apub/src/objects/post.rs index 403f3775b..4d8841dcc 100644 --- a/crates/apub/src/objects/post.rs +++ b/crates/apub/src/objects/post.rs @@ -42,6 +42,7 @@ use lemmy_db_schema::{ }, traits::Crud, }; +use lemmy_db_views_actor::structs::CommunityModeratorView; use lemmy_utils::{ error::LemmyError, utils::{markdown::markdown_to_html, slurs::check_slurs_opt, validation::check_url_scheme}, @@ -49,7 +50,6 @@ use lemmy_utils::{ use std::ops::Deref; use stringreader::StringReader; use url::Url; -use lemmy_db_views_actor::structs::CommunityModeratorView; const MAX_TITLE_LENGTH: usize = 200; @@ -179,7 +179,8 @@ impl Object for ApubPost { let creator = page.creator()?.dereference(context).await?; let community = page.community(context).await?; if community.posting_restricted_to_mods { - CommunityModeratorView::is_community_moderator(&mut context.pool(), community.id, creator.id).await?; + CommunityModeratorView::is_community_moderator(&mut context.pool(), community.id, creator.id) + .await?; } let mut name = page .name