Add subject to encoding, some packet fixes missed in previous commit
This commit is contained in:
parent
d86d90cdeb
commit
5e3b59ea7c
@ -27,6 +27,7 @@ class Message extends FTNBase
|
||||
use EncodeUTF8;
|
||||
|
||||
private const cast_utf8 = [
|
||||
'subject',
|
||||
'message',
|
||||
'message_src',
|
||||
];
|
||||
|
@ -47,13 +47,14 @@ class PacketInfo extends Command
|
||||
$this->info(sprintf('Capabilities: %x',$pkt->capability));
|
||||
$this->info(sprintf('Has Errors: %s',$pkt->errors->count() ? 'YES' : 'No'));
|
||||
|
||||
foreach ($pkt->messages as $msg) {
|
||||
foreach ($pkt as $msg) {
|
||||
$this->warn(sprintf('- Date: %s',$msg->date));
|
||||
$this->warn(sprintf(' - FLAGS: %s',$msg->flags()->filter()->keys()->join(', ')));
|
||||
$this->warn(sprintf(' - From: %s (%s)',$msg->user_from,$msg->fftn));
|
||||
$this->warn(sprintf(' - To: %s (%s)',$msg->user_to,$msg->tftn));
|
||||
$this->warn(sprintf(' - Subject: %s',$msg->subject));
|
||||
|
||||
if ($msg->errors)
|
||||
foreach ($msg->errors->errors()->all() as $error)
|
||||
$this->line(' - '.$error);
|
||||
}
|
||||
|
@ -36,12 +36,12 @@ class ProcessPacket extends Command
|
||||
$f = new File($this->argument('pkt'));
|
||||
$d = Domain::where('name',$this->argument('domain'))->singleOrFail();
|
||||
|
||||
foreach (Packet::open($f,$d)->messages as $msg) {
|
||||
foreach (Packet::open($f,$d) as $msg) {
|
||||
// @todo Quick check that the packet should be processed by us.
|
||||
// @todo validate that the packet's zone is in the domain.
|
||||
|
||||
// Dispatch job.
|
||||
Job::dispatchSync($msg);
|
||||
Job::dispatch($msg);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user