feat: update email logic to subject not user +

This commit is contained in:
Jet 2026-03-25 23:25:49 -07:00
parent ede986080a
commit 6a652ed4f3
No known key found for this signature in database
5 changed files with 136 additions and 27 deletions

View file

@ -12,6 +12,7 @@ pub struct AppState {
pub db: Mutex<Connection>,
pub notify_email: String,
pub mail_domain: String,
pub qa_reply_domain: String,
pub rate_limiter: RateLimiter,
pub webhook_secret: String,
}
@ -21,6 +22,8 @@ pub async fn run() -> Result<(), Box<dyn std::error::Error>> {
let notify_email = std::env::var("QA_NOTIFY_EMAIL").expect("QA_NOTIFY_EMAIL must be set");
let mail_domain =
std::env::var("QA_MAIL_DOMAIN").unwrap_or_else(|_| "extremist.software".to_string());
let qa_reply_domain =
std::env::var("QA_REPLY_DOMAIN").unwrap_or_else(|_| mail_domain.clone());
let webhook_secret = std::env::var("WEBHOOK_SECRET").expect("WEBHOOK_SECRET must be set");
let conn = Connection::open(&db_path)?;
@ -39,6 +42,7 @@ pub async fn run() -> Result<(), Box<dyn std::error::Error>> {
db: Mutex::new(conn),
notify_email,
mail_domain,
qa_reply_domain,
rate_limiter: RateLimiter::new(5, 3600),
webhook_secret,
});