Change the way we figure out zones in packets, some packet testing, fix Echomail import

This commit is contained in:
Deon George
2021-08-29 23:58:12 +10:00
parent 271f066667
commit 9fb6d191d0
11 changed files with 218 additions and 48 deletions

View File

@@ -2,11 +2,11 @@
namespace App\Classes;
use App\Models\{Address,Domain};
use App\Models\{Address,Zone};
abstract class FTN
{
protected ?Domain $domain; // Domain the packet is from
protected ?Zone $zone; // Zone the packet is from
public function __get($key)
{
@@ -17,7 +17,7 @@ abstract class FTN
$this->fn,
$this->ff,
$this->fp,
).($this->domain ? sprintf('@%s',$this->domain->name) : '');
).($this->zone ? sprintf('@%s',$this->zone->domain->name) : '');
case 'tftn':
return sprintf('%d:%d/%d.%d',
@@ -25,7 +25,7 @@ abstract class FTN
$this->tn,
$this->tf,
$this->tp,
).($this->domain ? sprintf('@%s',$this->domain->name) : '');
).($this->zone ? sprintf('@%s',$this->zone->domain->name) : '');
case 'fftn_o':
return Address::findFTN($this->fftn);