Improvements to working out region for new addresses, Bounce netmails to a invalid address (that we would host)
All checks were successful
Create Docker Image / Build Docker Image (x86_64) (push) Successful in 40s
Create Docker Image / Build Docker Image (arm64) (push) Successful in 1m36s
Create Docker Image / Final Docker Image Manifest (push) Successful in 10s

This commit is contained in:
2025-01-07 14:55:57 +11:00
parent 058b4ac4b9
commit 2c1ab88bbd
8 changed files with 107 additions and 16 deletions

View File

@@ -355,7 +355,6 @@ class Address extends Model
// Work out region
$region_id = NULL;
$zone_id = NULL;
// We can only work out region/zone if we have a domain - this is for 2D parsing
if ($matches[5] ?? NULL) {
$o = new self;
@@ -1357,7 +1356,7 @@ class Address extends Model
case self::NODE_HC: // NC
return self::active()
->where('zone_id',$this->zone_id)
->where('region_id',$this->region_id)
->when($this->region_id,fn($q)=>$q->where('region_id',$this->region_id))
->where('host_id',$this->host_id)
->where('node_id',0)
->where('point_id',0)
@@ -1393,7 +1392,7 @@ class Address extends Model
*/
private function session(string $type): ?string
{
return ($this->exists && ($x=$this->system->sessions->where('id',$this->zone_id)->first())) ? ($x->pivot->{$type} ?: '') : NULL;
return ($x=$this->system?->sessions->where('id',$this->zone_id)->first()) ? ($x->pivot->{$type} ?: '') : NULL;
}
/**