From 0e41f57ce5f9e2b0301f85ffce76854804eab5ce Mon Sep 17 00:00:00 2001 From: pavel Date: Thu, 12 Feb 2026 02:08:05 +0100 Subject: [PATCH] a --- src/domain/notifications/push.rs | 4 +++- src/domain/tasks.rs | 7 +++++-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/src/domain/notifications/push.rs b/src/domain/notifications/push.rs index 70ebb83..505c38f 100644 --- a/src/domain/notifications/push.rs +++ b/src/domain/notifications/push.rs @@ -67,8 +67,10 @@ impl PushSender { VapidSignatureBuilder::from_pem_no_sub(std::io::Cursor::new(&self.private_key)) .map_err(|e| crate::error::AppError::Internal(e.to_string()))?; + let mut builder = builder.add_sub_info(&subscription_info); + builder.add_claim("sub", "mailto:pavel@flegr.me"); + let vapid_signature = builder - .add_sub_info(&subscription_info) .build() .map_err(|e| crate::error::AppError::Internal(e.to_string()))?; diff --git a/src/domain/tasks.rs b/src/domain/tasks.rs index 1993535..ba69ae7 100644 --- a/src/domain/tasks.rs +++ b/src/domain/tasks.rs @@ -170,9 +170,12 @@ pub async fn execute_agent_run( }; tokio::spawn(async move { - let _ = sender + if let Err(e) = sender .send_notification(&sub_data, &format!("Task Completed: {}", status), &goal) - .await; + .await + { + tracing::error!("Failed to send notification in background task: {}", e); + } }); } }