Properly skip notifications only when nothing has happened

This commit is contained in:
Marc Plano-Lesay 2025-05-03 15:22:01 +10:00
parent 6d1b2e5049
commit 5e9dfa9fd0
Signed by: kernald
GPG key ID: 66A41B08CC62A6CF

View file

@ -27,7 +27,11 @@ pub trait Notification {
total_new_links: usize,
) -> bool {
// Don't send notification if everything was successful but 0 links were grabbed and processed
if total_new_links == 0 && action_results.values().all(|pm| pm.failed.is_empty()) {
if total_new_links == 0
&& action_results
.values()
.all(|pm| pm.failed.is_empty() && pm.success.is_empty())
{
return false;
}
true