Exported echomail should have the Hub as the OrigNet/OrigNode
This commit is contained in:
parent
953d3725b2
commit
c8ab8d3db3
@ -425,10 +425,10 @@ class Message extends FTNBase
|
|||||||
public function __toString(): string
|
public function __toString(): string
|
||||||
{
|
{
|
||||||
$return = pack(collect(self::header)->pluck(1)->join(''),
|
$return = pack(collect(self::header)->pluck(1)->join(''),
|
||||||
$this->ff,
|
$this->ff, // Originating Node
|
||||||
$this->tf,
|
$this->tf, // Destination Node
|
||||||
$this->fn,
|
$this->fn, // Originating Net
|
||||||
$this->tn,
|
$this->tn, // Destination Net
|
||||||
$this->flags&~(self::FLAG_INTRANSIT|self::FLAG_LOCAL), // Turn off our local/intransit bits
|
$this->flags&~(self::FLAG_INTRANSIT|self::FLAG_LOCAL), // Turn off our local/intransit bits
|
||||||
$this->cost,
|
$this->cost,
|
||||||
$this->date->format('d M y H:i:s'),
|
$this->date->format('d M y H:i:s'),
|
||||||
|
@ -181,13 +181,18 @@ final class Echomail extends Model implements Packet
|
|||||||
{
|
{
|
||||||
Log::info(sprintf('%s:+ Bundling [%s]',self::LOGKEY,$this->id));
|
Log::info(sprintf('%s:+ Bundling [%s]',self::LOGKEY,$this->id));
|
||||||
|
|
||||||
|
$sysaddress = Setup::findOrFail(config('app.id'))->system->match($this->fftn->zone)->first();
|
||||||
|
|
||||||
|
if (! $sysaddress)
|
||||||
|
throw new \Exception(sprintf('%s:! We dont have an address in this network? (%s)',self::LOGKEY,$this->fftn->zone->domain->name));
|
||||||
|
|
||||||
// @todo Dont bundle mail to nodes that have been disabled, or addresses that have been deleted
|
// @todo Dont bundle mail to nodes that have been disabled, or addresses that have been deleted
|
||||||
$o = new Message;
|
$o = new Message;
|
||||||
|
|
||||||
$o->header = [
|
$o->header = [
|
||||||
'onode' => $this->fftn->node_id,
|
'onode' => $sysaddress->node_id,
|
||||||
'dnode' => $ao->node_id,
|
'dnode' => $ao->node_id,
|
||||||
'onet' => $this->fftn->host_id,
|
'onet' => $sysaddress->host_id,
|
||||||
'dnet' => $ao->host_id,
|
'dnet' => $ao->host_id,
|
||||||
'flags' => 0,
|
'flags' => 0,
|
||||||
'cost' => 0,
|
'cost' => 0,
|
||||||
@ -221,11 +226,6 @@ final class Echomail extends Model implements Packet
|
|||||||
if ($this->origin)
|
if ($this->origin)
|
||||||
$o->origin = $this->origin;
|
$o->origin = $this->origin;
|
||||||
|
|
||||||
$sysaddress = Setup::findOrFail(config('app.id'))->system->match($this->fftn->zone)->first();
|
|
||||||
|
|
||||||
if (! $sysaddress)
|
|
||||||
throw new \Exception(sprintf('%s:! We dont have an address in this network? (%s)',self::LOGKEY,$this->fftn->zone->domain->name));
|
|
||||||
|
|
||||||
$o->seenby = $this->seenby->push($sysaddress)->unique()->pluck('ftn2d');
|
$o->seenby = $this->seenby->push($sysaddress)->unique()->pluck('ftn2d');
|
||||||
|
|
||||||
// Add our address to the path and seenby
|
// Add our address to the path and seenby
|
||||||
|
Loading…
Reference in New Issue
Block a user