Add domain to path/seenby for 4D addresses in tic files
All checks were successful
Create Docker Image / Build Docker Image (x86_64) (push) Successful in 29s
Create Docker Image / Build Docker Image (arm64) (push) Successful in 1m30s
Create Docker Image / Final Docker Image Manifest (push) Successful in 8s

This commit is contained in:
Deon George 2024-11-19 21:23:33 +09:30
parent bf4c282282
commit 733f4621a1

View File

@ -88,6 +88,10 @@ class File extends Model
$matches = [];
preg_match(sprintf('#^(%s)\ ((@?)(\d+)(\ ([A-Z]{3}([\+\-][0-9]+)))?)\ ?(.*)$#',Address::ftn_regex),$line,$matches);
// If our domain is blank, get the model's domain
if (! Arr::get($matches,6))
$matches[1] .= '@'.$model->filearea->domain->name;
if ($x=Arr::get($matches,1)) {
$ftn = Address::parseFTN($x);
@ -126,6 +130,9 @@ class File extends Model
$model->set_seenby = $model->set_seenby->merge($path->pluck('address.ftn3d'))->unique()->filter();
foreach ($model->set_seenby as $sb) {
if (! preg_match('/@([a-zA-Z0-9\-_~]{0,8})/',$sb))
$sb .= '@'.$model->filearea->domain->name;
$ftn = Address::parseFTN($sb);
$ao = ($zone->domain->flatten)