We had the contacted notification inversed, also dont alert on points.
This commit is contained in:
@@ -100,7 +100,7 @@ class AddressIdle implements ShouldQueue
|
|||||||
$contact = TRUE;
|
$contact = TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
$ao->contacted = (! $contact);
|
$ao->contacted = $contact;
|
||||||
$result->push($ao);
|
$result->push($ao);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -126,7 +126,7 @@ class AddressIdle implements ShouldQueue
|
|||||||
$ao->role |= Address::NODE_DOWN;
|
$ao->role |= Address::NODE_DOWN;
|
||||||
$ao->save();
|
$ao->save();
|
||||||
|
|
||||||
$ao->contacted = (! $contact);
|
$ao->contacted = $contact;
|
||||||
$result->push($ao);
|
$result->push($ao);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -162,7 +162,7 @@ class AddressIdle implements ShouldQueue
|
|||||||
$ao->role |= Address::NODE_HOLD;
|
$ao->role |= Address::NODE_HOLD;
|
||||||
$ao->save();
|
$ao->save();
|
||||||
|
|
||||||
$ao->contacted = (! $contact);
|
$ao->contacted = $contact;
|
||||||
$result->push($ao);
|
$result->push($ao);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -198,6 +198,7 @@ class AddressIdle implements ShouldQueue
|
|||||||
->where('addresses.active',TRUE)
|
->where('addresses.active',TRUE)
|
||||||
->where('zones.active',TRUE)
|
->where('zones.active',TRUE)
|
||||||
->where('domains.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'))
|
->whereNotIn('a.id',our_address()->pluck('id'))
|
||||||
->when($ao,fn($query)=>$query->where('addresses.id',$ao->id))
|
->when($ao,fn($query)=>$query->where('addresses.id',$ao->id))
|
||||||
->where('last_session','<',$age)
|
->where('last_session','<',$age)
|
||||||
|
Reference in New Issue
Block a user