Added echoareas and fileareas

This commit is contained in:
Deon George
2021-08-11 23:45:30 +10:00
parent c7388c2db6
commit eb0405f019
19 changed files with 773 additions and 48 deletions

View File

@@ -10,7 +10,7 @@ use Illuminate\Queue\SerializesModels;
use Illuminate\Support\Facades\Log;
use App\Classes\FTN\{Message,Process};
use App\Models\{Echomail,Netmail,Setup};
use App\Models\{Echoarea,Echomail,Netmail,Setup};
class ProcessPacket implements ShouldQueue
{
@@ -141,7 +141,10 @@ class ProcessPacket implements ShouldQueue
$this->msg->user_from,
));
// @todo Determine if we know about this echo area
$ea = Echoarea::where('name',$this->msg->echoarea)
->where('domain_id',$this->msg->fftn_o->zone->domain_id)
->single();
// @todo Can the sender create it if it doesnt exist?
// - Create it, or
// - Else record in bad area
@@ -155,7 +158,7 @@ class ProcessPacket implements ShouldQueue
$o->tzoffset = $this->msg->date->utcOffset();
$o->fftn_id = ($x=$this->msg->fftn_o) ? $x->id : NULL;
$o->echoarea = $this->msg->echoarea;
$o->echoarea_id = $ea?->id;
$o->msgid = $this->msg->msgid;
$o->msg = $this->msg->message_src;