- context.chat_server().do_send(SendModRoomMessage {
- op: UserOperation::CreatePostReport,
- response: res.clone(),
- community_id: post_view.community.id,
- websocket_id,
- });
-
- Report::send(
- ObjectId::new(post_view.post.ap_id),
- &local_user_view.person.into(),
- ObjectId::new(post_view.community.actor_id),
- reason.to_string(),
- context,
- )
- .await?;
+ // Email the admins
+ if local_site.reports_email_admins {
+ send_new_report_email_to_admins(
+ &post_report_view.creator.name,
+ &post_report_view.post_creator.name,
+ &mut context.pool(),
+ context.settings(),
+ )
+ .await?;
+ }