Process packet seenby/path/via lines when saving echomail/netmail

This commit is contained in:
2023-09-20 20:29:23 +10:00
parent 7fedf88d8c
commit 612efda945
11 changed files with 337 additions and 230 deletions

View File

@@ -34,6 +34,7 @@ class PacketProcess extends Command
*
* @return mixed
* @throws \App\Classes\FTN\InvalidPacketException
* @todo Should this just call PacketProcess instead?
*/
public function handle()
{
@@ -41,14 +42,12 @@ class PacketProcess extends Command
$a = Address::findFTN($this->argument('ftn'));
foreach ($f as $packet) {
foreach (Packet::process($packet,$f->itemName(),$f->itemSize(),$a->system) as $msg) {
foreach ($pkt = Packet::process($packet,$f->itemName(),$f->itemSize(),$a->zone->domain) as $msg) {
// @todo Quick check that the packet should be processed by us.
// @todo validate that the packet's zone is in the domain.
$this->info(sprintf('Processing message from [%s] with msgid [%s] in (%s)',$msg->fboss,$msg->msgid,$f->pktName()));
// Dispatch job.
Job::dispatchSync($msg,$f->pktName(),$a,$a,Carbon::now(),$this->option('nobot'));
Job::dispatchSync($msg,$f->pktName(),$a,$pkt->fftn_o,Carbon::now(),$this->option('nobot'));
}
}
}