More complete rework of packet parsing and packet generation with f279d85 - and testing passes

This commit is contained in:
2024-05-20 21:31:21 +10:00
parent b30ab2f999
commit ab2e288f06
14 changed files with 227 additions and 210 deletions

View File

@@ -8,7 +8,7 @@ namespace App\Traits;
use Carbon\Carbon;
use Illuminate\Support\Collection;
use Illuminate\Support\Facades\Log;
use Illuminate\Validation\Validator as ValidatorResult;
use Illuminate\Support\MessageBag;
use App\Classes\FTN\Message;
use App\Models\Address;
@@ -20,7 +20,7 @@ trait MessageAttributes
// Items we need to set when creating()
public Collection $set;
// Validation Errors
public ?ValidatorResult $errors = NULL;
public ?MessageBag $errors = NULL;
private const cast_utf8 = [
'to',
@@ -46,7 +46,7 @@ trait MessageAttributes
public function getContentAttribute(): string
{
if ($this->msg_src)
return $this->msg_src."\r";
return $this->msg_src;
// If we have a msg_src attribute, we'll use that
$result = $this->msg."\r\r";
@@ -60,7 +60,7 @@ trait MessageAttributes
if ($this->origin)
$result .= sprintf("%s",$this->origin);
return rtrim($result,"\r")."\r";
return rtrim($result,"\r");
}
public function getDateAttribute(): Carbon