From 617901f7df5f6b06efdca9db98e71dc4c77f09c6 Mon Sep 17 00:00:00 2001 From: Deon George Date: Sun, 30 Jun 2024 11:25:04 +1000 Subject: [PATCH] Add AKA to email notification --- app/Notifications/Emails/NodeDelisted.php | 6 +++++- app/Notifications/Emails/NodeMarkedDown.php | 6 +++++- app/Notifications/Emails/NodeMarkedHold.php | 6 +++++- 3 files changed, 15 insertions(+), 3 deletions(-) diff --git a/app/Notifications/Emails/NodeDelisted.php b/app/Notifications/Emails/NodeDelisted.php index bac5491..ae5a1fa 100644 --- a/app/Notifications/Emails/NodeDelisted.php +++ b/app/Notifications/Emails/NodeDelisted.php @@ -46,7 +46,11 @@ class NodeDelisted extends Notification //implements ShouldQueue return (new MailMessage) ->cc(our_address($this->ao)->system->users->first()->email) ->subject(sprintf('Your system has been DE-LISTED on %s from %s',$now->format('Y-m-d'),$x=$this->ao->zone->domain->name)) - ->line(sprintf('Your system has been DE-LISTED, because it hasnt polled **%s** since **%s** (%d days).',$x,$this->ao->system->last_session->format('Y-m-d'),$this->ao->system->last_session->diffInDays($now))) + ->line(sprintf('Your system has been DE-LISTED, because it hasnt polled **%s** with address %s since **%s** (%d days).', + $x, + $this->ao->ftn4d, + $this->ao->system->last_session->format('Y-m-d'), + $this->ao->system->last_session->diffInDays($now))) ->line('') ->line('If you think this was a mistake, please let me know.') ->line(sprintf('If you think about returning to %s, then reach out and we can get you back online pretty quickly.',$x)); diff --git a/app/Notifications/Emails/NodeMarkedDown.php b/app/Notifications/Emails/NodeMarkedDown.php index 5050f6f..50cddae 100644 --- a/app/Notifications/Emails/NodeMarkedDown.php +++ b/app/Notifications/Emails/NodeMarkedDown.php @@ -46,7 +46,11 @@ class NodeMarkedDown extends Notification //implements ShouldQueue return (new MailMessage) ->cc(our_address($this->ao)->system->users->first()->email) ->subject(sprintf('ACTION REQUIRED: Your system will be delisted on %s',$now->format('Y-m-d'))) - ->line(sprintf('Your system has been marked **DOWN**, because it hasnt polled **%s** since **%s** (%d days).',$this->ao->zone->domain->name,$this->ao->system->last_session->format('Y-m-d'),$this->ao->system->last_session->diffInDays($now))) + ->line(sprintf('Your system has been marked **DOWN**, because it hasnt polled **%s** with address %s since **%s** (%d days).', + $this->ao->zone->domain->name, + $this->ao->ftn4d, + $this->ao->system->last_session->format('Y-m-d'), + $this->ao->system->last_session->diffInDays($now))) ->line('') ->line('You have (waiting for collection):') ->lineIf($this->ao->uncollected_netmail,sprintf('* %s Netmails',number_format($this->ao->uncollected_netmail))) diff --git a/app/Notifications/Emails/NodeMarkedHold.php b/app/Notifications/Emails/NodeMarkedHold.php index 7d69176..be8ebf2 100644 --- a/app/Notifications/Emails/NodeMarkedHold.php +++ b/app/Notifications/Emails/NodeMarkedHold.php @@ -46,7 +46,11 @@ class NodeMarkedHold extends Notification //implements ShouldQueue return (new MailMessage) ->cc(our_address($this->ao)->system->users->first()->email) ->subject('Your system has been marked HOLD') - ->line(sprintf('Your system has been marked **HOLD**, because it hasnt polled **%s** since **%s** (%d days).',$this->ao->zone->domain->name,$this->ao->system->last_session->format('Y-m-d'),$this->ao->system->last_session->diffInDays($now))) + ->line(sprintf('Your system has been marked **HOLD**, because it hasnt polled **%s** with address %s since **%s** (%d days).', + $this->ao->zone->domain->name, + $this->ao->ftn4d, + $this->ao->system->last_session->format('Y-m-d'), + $this->ao->system->last_session->diffInDays($now))) ->line('') ->line('You have (waiting for collection):') ->lineIf($this->ao->uncollected_netmail,sprintf('* %s Netmails',number_format($this->ao->uncollected_netmail)))