From 65b2a2d519bef63da377931009be5259bfe042d0 Mon Sep 17 00:00:00 2001 From: Deon George Date: Sun, 26 May 2024 22:08:39 +1000 Subject: [PATCH] Fix from bug introduct by 7e0178d for echomails --- app/Traits/MessageAttributes.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/app/Traits/MessageAttributes.php b/app/Traits/MessageAttributes.php index 588ca58..3eaf922 100644 --- a/app/Traits/MessageAttributes.php +++ b/app/Traits/MessageAttributes.php @@ -11,7 +11,7 @@ use Illuminate\Support\Facades\Log; use Illuminate\Support\MessageBag; use App\Classes\FTN\Message; -use App\Models\Address; +use App\Models\{Address,Echomail}; trait MessageAttributes { @@ -169,6 +169,10 @@ trait MessageAttributes { Log::debug(sprintf('%s:+ Bundling [%s] for [%s]',self::LOGKEY,$this->id,$ao->ftn),['type'=>get_class($this)]); + // For echomail, our tftn is this address + if ($this instanceof Echomail) + $this->tftn = $ao; + // @todo Dont bundle mail to nodes that have been disabled, or addresses that have been deleted return Message::packMessage($this); }