From 95b6058020e5c4af8895dccd6cdc9b75ecf3da36 Mon Sep 17 00:00:00 2001 From: Deon George Date: Fri, 7 Jun 2024 09:30:40 +1000 Subject: [PATCH] Fixes for Idle notifications --- app/Notifications/Echomails/AbsentNodes.php | 5 +++-- app/Notifications/Echomails/Test.php | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/app/Notifications/Echomails/AbsentNodes.php b/app/Notifications/Echomails/AbsentNodes.php index cbd92f8..05eeb12 100644 --- a/app/Notifications/Echomails/AbsentNodes.php +++ b/app/Notifications/Echomails/AbsentNodes.php @@ -44,9 +44,10 @@ class AbsentNodes extends Echomails Log::info(sprintf('%s:+ Creating NODE ABSENT echomail in [%s]',self::LOGKEY,$echoarea->name)); + $our = our_address($echoarea->domain)->last(); $o->to = 'All'; $o->subject = 'Status changes for nodes'; - $o->fftn_id = ($x=our_address($echoarea->domain)->last())->id; + $o->fftn_id = $our->id; $o->kludges->put('CHRS:','CP437 2'); // Message @@ -95,7 +96,7 @@ class AbsentNodes extends Echomails $o->msg = $msg->render(); $o->set_tagline = 'When life gives you lemons, freeze them and throw them back.'; - $o->set_origin = sprintf('%s (%s)',Setup::PRODUCT_NAME,$x->ftn4d); + $o->set_origin = sprintf('%s (%s)',Setup::PRODUCT_NAME,$our->ftn4d); $o->save(); diff --git a/app/Notifications/Echomails/Test.php b/app/Notifications/Echomails/Test.php index e5d4cbe..ee81826 100644 --- a/app/Notifications/Echomails/Test.php +++ b/app/Notifications/Echomails/Test.php @@ -45,8 +45,9 @@ class Test extends Echomails Log::info(sprintf('%s:+ Creating TEST echomail in [%s]',self::LOGKEY,$echoarea->name)); + $our = our_address($this->mo->fftn); $o->to = $this->mo->from; - $o->fftn_id = ($x=our_address($this->mo->fftn))->id; + $o->fftn_id = $our->id; $o->replyid = $this->mo->msgid; $o->subject = 'Test Reply'; $o->kludges->put('CHRS:',$this->mo->kludges->get('chrs') ?: 'CP437 2'); @@ -74,7 +75,7 @@ class Test extends Echomails $o->msg = $msg->render(); $o->set_tagline = 'I ate a clock yesterday, it was very time-consuming.'; - $o->set_origin = sprintf('%s (%s)',Setup::PRODUCT_NAME,$x->ftn4d); + $o->set_origin = sprintf('%s (%s)',Setup::PRODUCT_NAME,$our->ftn4d); $o->save();