NodesNew also now sends an Echomail
All checks were successful
Create Docker Image / Build Docker Image (x86_64) (push) Successful in 37s
Create Docker Image / Build Docker Image (arm64) (push) Successful in 1m34s
Create Docker Image / Final Docker Image Manifest (push) Successful in 10s

This commit is contained in:
2024-12-08 21:38:10 +11:00
parent f4ee2e1a51
commit 46cf488337
4 changed files with 145 additions and 21 deletions

View File

@@ -32,9 +32,6 @@ class NodesNew extends Netmails //implements ShouldQueue
$this->since = $since;
}
/**
* Get the mail representation of the notification.
*/
public function toNetmail(object $notifiable): Netmail
{
$o = $this->setupNetmail($notifiable);
@@ -42,14 +39,27 @@ class NodesNew extends Netmails //implements ShouldQueue
Log::info(sprintf('%s:+ Sending a NEW NODE LIST to [%s] at address [%s]',self::LOGKEY,$ao->system->sysop,$ao->ftn));
$o->subject = sprintf('Here is a list of new nodes on clrghouz since %s',$x=$this->since->format('Y-m-d'));
$o->subject = sprintf('Here is a list of new nodes on clrghouz since %s',$this->since->format('Y-m-d'));
$o->flags = (Message::FLAG_LOCAL|Message::FLAG_PRIVATE|Message::FLAG_CRASH);
$o->msg = $this->report($ao);
$o->set_tagline = 'All aboard!';
$o->save();
return $o;
}
/**
* Return the rendered new nodes report.
*/
public function report(Address $ao): string
{
// Message
$msg = $this->page(FALSE,'new nodes');
$msg->addText(sprintf("Hi %s,\r\r",$ao->system->sysop))
->addText(sprintf("The following new system have been defined on clrghouz since %s.\r\r",$x));
->addText(sprintf("The following new system have been defined on clrghouz since %s.\r\r",$this->since->format('Y-m-d')));
$this->list->loadMissing(['system']);
@@ -95,11 +105,6 @@ class NodesNew extends Netmails //implements ShouldQueue
}
}
$o->msg = $msg->render();
$o->set_tagline = 'All aboard!';
$o->save();
return $o;
return $msg->render();
}
}