From c1e6d436e5b909658fa3a2cdcab4ec8661b5ba1b Mon Sep 17 00:00:00 2001 From: Deon George Date: Sun, 30 Jun 2024 11:40:53 +1000 Subject: [PATCH] We had the contacted notification inversed, also dont alert on points. --- app/Jobs/AddressIdle.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/app/Jobs/AddressIdle.php b/app/Jobs/AddressIdle.php index 143d016..0eec182 100644 --- a/app/Jobs/AddressIdle.php +++ b/app/Jobs/AddressIdle.php @@ -100,7 +100,7 @@ class AddressIdle implements ShouldQueue $contact = TRUE; } - $ao->contacted = (! $contact); + $ao->contacted = $contact; $result->push($ao); } @@ -126,7 +126,7 @@ class AddressIdle implements ShouldQueue $ao->role |= Address::NODE_DOWN; $ao->save(); - $ao->contacted = (! $contact); + $ao->contacted = $contact; $result->push($ao); } @@ -162,7 +162,7 @@ class AddressIdle implements ShouldQueue $ao->role |= Address::NODE_HOLD; $ao->save(); - $ao->contacted = (! $contact); + $ao->contacted = $contact; $result->push($ao); } @@ -198,6 +198,7 @@ class AddressIdle implements ShouldQueue ->where('addresses.active',TRUE) ->where('zones.active',TRUE) ->where('domains.active',TRUE) + ->where(fn($query)=>$query->where('a.point_id',0)->orWhereNull('a.point_id')) ->whereNotIn('a.id',our_address()->pluck('id')) ->when($ao,fn($query)=>$query->where('addresses.id',$ao->id)) ->where('last_session','<',$age)