Fix messages to points, and fix netmail coming from systems which dont include an Origin line

This commit is contained in:
2023-07-20 20:04:41 +10:00
parent db37cc7aa4
commit 8d9bde9692
7 changed files with 40 additions and 26 deletions

View File

@@ -646,7 +646,7 @@ class Address extends Model
* @param Collection $msgs of message models (Echomail/Netmail)
* @return Packet|null
*/
private function getPacket(Collection $msgs): ?Packet
public function getPacket(Collection $msgs): ?Packet
{
$s = Setup::findOrFail(config('app.id'));
$ao = $s->system->match($this->zone)->first();

View File

@@ -143,7 +143,9 @@ final class Netmail extends Model implements Packet
'dnode' => $ao->node_id,
'onet' => $this->fftn->host_id,
'dnet' => $ao->host_id,
'flags' => 0, // @todo?
'opoint' => $this->fftn->point_id,
'dpoint' => $ao->point_id,
'flags' => 0,
'cost' => 0,
'date'=>$this->datetime->format('d M y H:i:s'),
];
@@ -154,7 +156,6 @@ final class Netmail extends Model implements Packet
$o->subject = $this->subject;
// INTL kludge
// @todo Point handling FMPT/TOPT
$o->intl = sprintf('%s %s',$this->tftn->ftn3d,$this->fftn->ftn3d);
$o->flags = $this->flags;