Merge branch 'fix-notify' into 'main'

Properly skip notifications only when nothing has happened

See merge request kernald/reddit-magnet!22
This commit is contained in:
Marc Plano-Lesay 2025-05-03 05:25:25 +00:00
commit 640423f9cd

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