Remove Address::downstream() for Address::downlinks()
This commit is contained in:
@@ -1062,20 +1062,6 @@ class Address extends Model
|
||||
return $children->diff($exclude);
|
||||
}
|
||||
|
||||
/**
|
||||
* List of all our nodes and their children
|
||||
*
|
||||
* @return \Illuminate\Support\Collection
|
||||
* @throws \Exception
|
||||
* @deprecated use children()
|
||||
*/
|
||||
public function downstream(): \Illuminate\Support\Collection
|
||||
{
|
||||
return $this->downlinks()->transform(function($item) {
|
||||
return $item->nodes()->push($item);
|
||||
})->flatten();
|
||||
}
|
||||
|
||||
/**
|
||||
* Files waiting to be sent to this system
|
||||
*
|
||||
@@ -1266,8 +1252,8 @@ class Address extends Model
|
||||
// Addresses that our downstream of this address, except anybody that has session details with us
|
||||
$ours = our_nodes($this->zone->domain)->pluck('id');
|
||||
|
||||
$addresses = $this->downstream()
|
||||
->filter(fn($item)=>! $ours->contains($item->id))
|
||||
$addresses = $this->downlinks()
|
||||
->filter(fn($item)=>(! $ours->contains($item->id)))
|
||||
->merge($this->system->match($this->zone,Address::NODE_ALL));
|
||||
|
||||
$netmails = $this
|
||||
|
Reference in New Issue
Block a user