diff --git a/lemmy_api/src/user.rs b/lemmy_api/src/user.rs index ad3d98087..6dffc1a79 100644 --- a/lemmy_api/src/user.rs +++ b/lemmy_api/src/user.rs @@ -38,7 +38,7 @@ use lemmy_db::{ ListingType, SortType, }; -use lemmy_structs::{blocking, user::*}; +use lemmy_structs::{blocking, send_email_to_user, user::*}; use lemmy_utils::{ apub::{generate_actor_keypair, make_apub_endpoint, EndpointType}, email::send_email, @@ -61,7 +61,6 @@ use lemmy_websocket::{ LemmyContext, UserOperation, }; -use log::error; use std::str::FromStr; #[async_trait::async_trait(?Send)] @@ -1041,23 +1040,12 @@ impl Perform for CreatePrivateMessage { let recipient_user = blocking(context.pool(), move |conn| User_::read(conn, recipient_id)).await??; if recipient_user.send_notifications_to_email { - if let Some(email) = recipient_user.email { - let subject = &format!( - "{} - Private Message from {}", - Settings::get().hostname, - user.name, - ); - let html = &format!( - "