Properly skip notifications only when nothing has happened
This commit is contained in:
parent
6d1b2e5049
commit
5e9dfa9fd0
1 changed files with 5 additions and 1 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue