Fix sorting of seenby/path items in echomail/netmail. Add rogue_seenby to seenby in echomail
This commit is contained in:
@@ -242,6 +242,22 @@ class Address extends Model
|
||||
return ($o && $o->system->active) ? $o : NULL;
|
||||
}
|
||||
|
||||
public static function newFTN(string $address): self
|
||||
{
|
||||
$ftn = self::parseFTN($address);
|
||||
$o = new self;
|
||||
|
||||
$zo = Zone::where('zone_id',$ftn['z'])->single();
|
||||
|
||||
$o->zone_id = $zo?->id;
|
||||
$o->region_id = $ftn['r'];
|
||||
$o->host_id = $ftn['n'];
|
||||
$o->node_id = $ftn['f'];
|
||||
$o->point_id = $ftn['p'];
|
||||
|
||||
return $o;
|
||||
}
|
||||
|
||||
/**
|
||||
* This is to find an address for a domain (like fidonet), which is technically 2D even though it uses multiple zones.
|
||||
*
|
||||
|
@@ -222,7 +222,8 @@ final class Echomail extends Model implements Packet
|
||||
public function path()
|
||||
{
|
||||
return $this->belongsToMany(Address::class,'echomail_path')
|
||||
->withPivot(['id','parent_id','recv_pkt','recv_at']);
|
||||
->withPivot(['id','parent_id','recv_pkt','recv_at'])
|
||||
->orderBy('id','DESC');
|
||||
}
|
||||
|
||||
/* ATTRIBUTES */
|
||||
|
@@ -179,6 +179,7 @@ final class Netmail extends Model implements Packet
|
||||
{
|
||||
return $this->belongsToMany(Address::class,'netmail_path')
|
||||
->withPivot(['id','parent_id','datetime','program','recv_pkt','recv_id'])
|
||||
->orderBy('netmail_path.id')
|
||||
->using(ViaPivot::class);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user