From bf4c282282680706b39fd5d98fa90cdd341a8c55 Mon Sep 17 00:00:00 2001 From: Deon George Date: Tue, 19 Nov 2024 20:32:45 +0930 Subject: [PATCH] Optionally, also find TIC sender address in tic sending node's list of addresses --- app/Classes/FTN/Tic.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/Classes/FTN/Tic.php b/app/Classes/FTN/Tic.php index 3b110e2..ff5eb99 100644 --- a/app/Classes/FTN/Tic.php +++ b/app/Classes/FTN/Tic.php @@ -219,6 +219,8 @@ class Tic extends FTNBase case 'from': if (($ao=Address::findFTN($m[2])) && ((! $aid) || ($ao->zone->domain_id === Address::findOrFail(hexdec($aid))->zone->domain_id))) $this->file->fftn_id = $ao->id; + elseif ($aid && ($x=Address::findOrFail(hexdec($aid))) && (($y=$x->system->akas->search(fn($item)=>str_starts_with($item->ftn,$m[2]))) !== FALSE)) + $this->file->fftn_id = $x->system->akas->get($y)->id; else throw new ModelNotFoundException(sprintf('FTN Address [%s] not found or sender mismatch',$m[2]));