Code improvement to our_address(), reducing arguments
This commit is contained in:
@@ -829,7 +829,7 @@ class Address extends Model
|
||||
public function getPacket(Collection $msgs,string $passwd=NULL): ?Packet
|
||||
{
|
||||
$s = Setup::findOrFail(config('app.id'));
|
||||
$ao = our_address($this->zone->domain,$this);
|
||||
$ao = our_address($this);
|
||||
|
||||
// If we dont match on the address, we cannot pack mail for that system
|
||||
if (! $ao) {
|
||||
|
@@ -214,7 +214,7 @@ final class Echomail extends Model implements Packet
|
||||
{
|
||||
Log::info(sprintf('%s:+ Bundling [%s]',self::LOGKEY,$this->id));
|
||||
|
||||
$sysaddress = our_address($this->fftn->zone->domain,$this->fftn);
|
||||
$sysaddress = our_address($this->fftn);
|
||||
|
||||
if (! $sysaddress)
|
||||
throw new \Exception(sprintf('%s:! We dont have an address in this network? (%s)',self::LOGKEY,$this->fftn->zone->domain->name));
|
||||
|
@@ -210,7 +210,7 @@ final class Netmail extends Model implements Packet
|
||||
// Add our address to the VIA line
|
||||
$via->push(
|
||||
sprintf('%s @%s.UTC %s %d.%d/%s %s',
|
||||
our_address($this->fftn->zone->domain,$this->fftn)->ftn3d,
|
||||
our_address($this->fftn)->ftn3d,
|
||||
Carbon::now()->utc()->format('Ymd.His'),
|
||||
str_replace(' ','_',Setup::PRODUCT_NAME),
|
||||
Setup::PRODUCT_VERSION_MAJ,
|
||||
|
Reference in New Issue
Block a user