Correctly storing netmail flags (intransit, local, recv) with senders ID and packet name
This commit is contained in:
@@ -19,7 +19,7 @@ class PacketProcess extends Command
|
||||
protected $signature = 'packet:process'
|
||||
.' {file : Packet to process}'
|
||||
.' {--N|nobot : Dont process bots}'
|
||||
.' {ftn? : System the packet is from}';
|
||||
.' {ftn : System the packet is from}';
|
||||
|
||||
/**
|
||||
* The console command description.
|
||||
@@ -37,18 +37,18 @@ class PacketProcess extends Command
|
||||
public function handle()
|
||||
{
|
||||
$f = new File($this->argument('file'));
|
||||
$s = $this->argument('ftn') ? Address::findFTN($this->argument('ftn'))->system : NULL;
|
||||
$a = Address::findFTN($this->argument('ftn'));
|
||||
|
||||
foreach ($f as $packet) {
|
||||
foreach (Packet::process($packet,$f->itemName(),$f->itemSize(),$s) as $msg) {
|
||||
foreach (Packet::process($packet,$f->itemName(),$f->itemSize(),$a->system) 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(),$this->option('nobot'));
|
||||
Job::dispatchSync($msg,$f->pktName(),$a,$this->option('nobot'));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user