Revert part of 9299697, so that our (lowest) address is selected, especially in the case for msgid creation
All checks were successful
Create Docker Image / Build Docker Image (x86_64) (push) Successful in 32s
Create Docker Image / Build Docker Image (arm64) (push) Successful in 1m34s
Create Docker Image / Final Docker Image Manifest (push) Successful in 10s

This commit is contained in:
Deon George 2024-04-14 11:03:17 +10:00
parent ae0bd09a47
commit bb42f418e0

View File

@ -107,7 +107,7 @@ function our_address(Domain $do=NULL,Address $ao=NULL): Collection|Address|NULL
$filter = $our->filter(function($item) use ($do) { return $item->zone->domain_id === $do->id; })->sortBy('role');
// If we are looking for a specific address, and there is only 1 result, return it, otherwise return what we have
if ($ao && config('fido.strict') && ($x=$filter->filter(function($item) use ($ao) { return $item->role < $ao->role; })->sortBy('role'))->count())
if ($ao && config('fido.strict') && ($x=$filter->filter(function($item) use ($ao) { return $item->role <= $ao->role; })->sortBy('role'))->count())
$filter = $x;
return $ao ? $filter->last() : ($do ? $filter : $our);