diff --git a/crates/notifications/src/lib.rs b/crates/notifications/src/lib.rs index c24384e..8a4d683 100644 --- a/crates/notifications/src/lib.rs +++ b/crates/notifications/src/lib.rs @@ -176,7 +176,6 @@ pub async fn send_test_message(config: &TelegramConfig) -> Result<()> { send_telegram( config, "🔔 Stripstream Librarian\n\ - ━━━━━━━━━━━━━━━━━━━━\n\ ✅ Test notification — connection OK!", ) .await @@ -305,7 +304,7 @@ fn format_event(event: &NotificationEvent) -> String { let duration = format_duration(*duration_seconds); let mut lines = vec![ format!("✅ Scan completed"), - format!("━━━━━━━━━━━━━━━━━━━━"), + String::new(), format!("📂 Library: {lib}"), format!("🏷 Type: {job_type}"), format!("⏱ Duration: {duration}"), @@ -330,7 +329,7 @@ fn format_event(event: &NotificationEvent) -> String { let err = truncate(error, 200); [ format!("🚨 Scan failed"), - format!("━━━━━━━━━━━━━━━━━━━━"), + String::new(), format!("📂 Library: {lib}"), format!("🏷 Type: {job_type}"), String::new(), @@ -345,7 +344,7 @@ fn format_event(event: &NotificationEvent) -> String { let lib = library_name.as_deref().unwrap_or("All libraries"); [ format!("⏹ Scan cancelled"), - format!("━━━━━━━━━━━━━━━━━━━━"), + String::new(), format!("📂 Library: {lib}"), format!("🏷 Type: {job_type}"), ] @@ -360,7 +359,7 @@ fn format_event(event: &NotificationEvent) -> String { let duration = format_duration(*duration_seconds); [ format!("✅ Thumbnails completed"), - format!("━━━━━━━━━━━━━━━━━━━━"), + String::new(), format!("📂 Library: {lib}"), format!("🏷 Type: {job_type}"), format!("⏱ Duration: {duration}"), @@ -376,7 +375,7 @@ fn format_event(event: &NotificationEvent) -> String { let err = truncate(error, 200); [ format!("🚨 Thumbnails failed"), - format!("━━━━━━━━━━━━━━━━━━━━"), + String::new(), format!("📂 Library: {lib}"), format!("🏷 Type: {job_type}"), String::new(), @@ -393,7 +392,7 @@ fn format_event(event: &NotificationEvent) -> String { let title = book_title.as_deref().unwrap_or("Unknown"); [ format!("✅ CBR → CBZ conversion completed"), - format!("━━━━━━━━━━━━━━━━━━━━"), + String::new(), format!("📂 Library: {lib}"), format!("📖 Book: {title}"), ] @@ -410,7 +409,7 @@ fn format_event(event: &NotificationEvent) -> String { let err = truncate(error, 200); [ format!("🚨 CBR → CBZ conversion failed"), - format!("━━━━━━━━━━━━━━━━━━━━"), + String::new(), format!("📂 Library: {lib}"), format!("📖 Book: {title}"), String::new(), @@ -425,7 +424,7 @@ fn format_event(event: &NotificationEvent) -> String { } => { [ format!("✅ Metadata linked"), - format!("━━━━━━━━━━━━━━━━━━━━"), + String::new(), format!("📚 Series: {series_name}"), format!("🔗 Provider: {provider}"), ] @@ -439,7 +438,7 @@ fn format_event(event: &NotificationEvent) -> String { let lib = library_name.as_deref().unwrap_or("All libraries"); [ format!("✅ Metadata batch completed"), - format!("━━━━━━━━━━━━━━━━━━━━"), + String::new(), format!("📂 Library: {lib}"), format!("📊 Processed: {processed}/{total_series} series"), ] @@ -453,7 +452,7 @@ fn format_event(event: &NotificationEvent) -> String { let err = truncate(error, 200); [ format!("🚨 Metadata batch failed"), - format!("━━━━━━━━━━━━━━━━━━━━"), + String::new(), format!("📂 Library: {lib}"), String::new(), format!("💬 {err}"), @@ -469,7 +468,7 @@ fn format_event(event: &NotificationEvent) -> String { let lib = library_name.as_deref().unwrap_or("All libraries"); let mut lines = vec![ format!("✅ Metadata refresh completed"), - format!("━━━━━━━━━━━━━━━━━━━━"), + String::new(), format!("📂 Library: {lib}"), String::new(), format!("📊 Results"), @@ -489,7 +488,7 @@ fn format_event(event: &NotificationEvent) -> String { let err = truncate(error, 200); [ format!("🚨 Metadata refresh failed"), - format!("━━━━━━━━━━━━━━━━━━━━"), + String::new(), format!("📂 Library: {lib}"), String::new(), format!("💬 {err}"), @@ -504,7 +503,7 @@ fn format_event(event: &NotificationEvent) -> String { let lib = library_name.as_deref().unwrap_or("All libraries"); [ format!("✅ Reading status match completed"), - format!("━━━━━━━━━━━━━━━━━━━━"), + String::new(), format!("📂 Library: {lib}"), String::new(), format!("📊 Results"), @@ -520,7 +519,7 @@ fn format_event(event: &NotificationEvent) -> String { let err = truncate(error, 200); [ format!("🚨 Reading status match failed"), - format!("━━━━━━━━━━━━━━━━━━━━"), + String::new(), format!("📂 Library: {lib}"), String::new(), format!("💬 {err}"), @@ -535,7 +534,7 @@ fn format_event(event: &NotificationEvent) -> String { let lib = library_name.as_deref().unwrap_or("All libraries"); [ format!("✅ Reading status push completed"), - format!("━━━━━━━━━━━━━━━━━━━━"), + String::new(), format!("📂 Library: {lib}"), String::new(), format!("📊 Results"), @@ -551,7 +550,7 @@ fn format_event(event: &NotificationEvent) -> String { let err = truncate(error, 200); [ format!("🚨 Reading status push failed"), - format!("━━━━━━━━━━━━━━━━━━━━"), + String::new(), format!("📂 Library: {lib}"), String::new(), format!("💬 {err}"),