diff --git a/app/Notifications/Emails/NodeMarkedDown.php b/app/Notifications/Emails/NodeMarkedDown.php index b066a5a..2156c82 100644 --- a/app/Notifications/Emails/NodeMarkedDown.php +++ b/app/Notifications/Emails/NodeMarkedDown.php @@ -53,9 +53,9 @@ class NodeMarkedDown extends Notification //implements ShouldQueue $this->ao->system->last_seen?->diffInDays($now))) ->line('') ->line('You have (waiting for collection):') - ->line(sprintf('* %s Netmails',number_format($this->ao->uncollected_netmail))) - ->line(sprintf('* %s Echomails',number_format($this->ao->uncollected_echomail))) - ->line(sprintf('* %s Files',number_format($this->ao->uncollected_files))) + ->line(sprintf('* %s Netmails',number_format($this->ao->netmailWaiting()->count()))) + ->line(sprintf('* %s Echomails',number_format($this->ao->echomailWaiting()->count()))) + ->line(sprintf('* %s Files',number_format($this->ao->filesWaiting()->count()))) ->line('') ->line(sprintf('Your system will automatically be **DE-LISTED** if your system hasnt polled to collected your mail/file(s) by **%s**',$now->addDays(7)->format('Y-m-d'))) ->line('If you think you\'ve received this email by mistake or need help, please let me know.'); diff --git a/app/Notifications/Emails/NodeMarkedHold.php b/app/Notifications/Emails/NodeMarkedHold.php index 9c47dfd..7cc1dc3 100644 --- a/app/Notifications/Emails/NodeMarkedHold.php +++ b/app/Notifications/Emails/NodeMarkedHold.php @@ -53,9 +53,9 @@ class NodeMarkedHold extends Notification //implements ShouldQueue $this->ao->system->last_seen?->diffInDays($now))) ->line('') ->line('You have (waiting for collection):') - ->line(sprintf('* %s Netmails',number_format($this->ao->uncollected_netmail))) - ->line(sprintf('* %s Echomails',number_format($this->ao->uncollected_echomail))) - ->line(sprintf('* %s Files',number_format($this->ao->uncollected_files))) + ->line(sprintf('* %s Netmails',number_format($this->ao->netmailWaiting()->count()))) + ->line(sprintf('* %s Echomails',number_format($this->ao->echomailWaiting()->count()))) + ->line(sprintf('* %s Files',number_format($this->ao->filesWaiting()->count()))) ->line('') ->line(sprintf('To clear this status, all you need to do make sure your system polls and collects mail by **%s**',($this->ao->system->last_seen ?: Carbon::now())->addDays(config('fido.idle.down'))->format('Y-m-d'))) ->line('If you think you\'ve received this email by mistake or need help, please let me know.'); diff --git a/app/Notifications/Netmails/NodeDelisted.php b/app/Notifications/Netmails/NodeDelisted.php index a011f04..f146d65 100644 --- a/app/Notifications/Netmails/NodeDelisted.php +++ b/app/Notifications/Netmails/NodeDelisted.php @@ -44,7 +44,7 @@ class NodeDelisted extends Netmails //implements ShouldQueue $msg = $this->page(TRUE,'delist'); $msg->addText(sprintf("Hi %s,\r\r",$this->ao->system->sysop)) - ->addText(sprintf("Your system has been marked **DE-LISTED**, because it hasnt polled **%s** with address %s since **%s** (%d days).\r",$this->ao->zone->domain->name,$this->ao->ftn4d,$this->ao->system->last_seen?->format('Y-m-d') ?: 'Not seen',$this->ao->system->last_seen?->diffInDays($now))) + ->addText(sprintf("Your system has been **DE-LISTED**, because it hasnt polled **%s** with address %s since **%s** (%d days).\r",$this->ao->zone->domain->name,$this->ao->ftn4d,$this->ao->system->last_seen?->format('Y-m-d') ?: 'Not seen',$this->ao->system->last_seen?->diffInDays($now))) ->addText("\r") ->addText("If you think this was a mistake, please let me know.\r\r") ->addText(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/Netmails/NodeMarkedDown.php b/app/Notifications/Netmails/NodeMarkedDown.php index 7161b84..f6a6240 100644 --- a/app/Notifications/Netmails/NodeMarkedDown.php +++ b/app/Notifications/Netmails/NodeMarkedDown.php @@ -46,9 +46,9 @@ class NodeMarkedDown extends Netmails //implements ShouldQueue ->addText(sprintf("Your system has been marked **DOWN**, because it hasnt polled **%s** with address %s since **%s** (%d days).\r",$this->ao->zone->domain->name,$this->ao->ftn4d,$this->ao->system->last_seen?->format('Y-m-d') ?: 'Not seen',$this->ao->system->last_seen?->diffInDays($now))) ->addText("\r") ->addText("You have (waiting for collection):\r") - ->addText(sprintf("* %s Netmails\r",number_format($this->ao->uncollected_netmail))) - ->addText(sprintf("* %s Echomails\r",number_format($this->ao->uncollected_echomail))) - ->addText(sprintf("* %s Files\r",number_format($this->ao->uncollected_files))) + ->addText(sprintf('* %s Netmails',number_format($this->ao->netmailWaiting()->count()))) + ->addText(sprintf('* %s Echomails',number_format($this->ao->echomailWaiting()->count()))) + ->addText(sprintf('* %s Files',number_format($this->ao->filesWaiting()->count()))) ->addText("\r") ->addText(sprintf("Your system will automatically be **DE-LISTED** if your system hasnt polled to collected your mail/file(s) by **%s**\r\r",$now->addDays(7)->format('Y-m-d'))) ->addText("If you think you've received this netmail by mistake or need help, please let me know.\r"); diff --git a/app/Notifications/Netmails/NodeMarkedHold.php b/app/Notifications/Netmails/NodeMarkedHold.php index 0cb6885..7ed1e5c 100644 --- a/app/Notifications/Netmails/NodeMarkedHold.php +++ b/app/Notifications/Netmails/NodeMarkedHold.php @@ -47,9 +47,9 @@ class NodeMarkedHold extends Netmails //implements ShouldQueue ->addText(sprintf("Your system has been marked **HOLD**, because it hasnt polled **%s** with address %s since **%s** (%d days).\r",$this->ao->zone->domain->name,$this->ao->ftn4d,$this->ao->system->last_seen?->format('Y-m-d') ?: 'Not seen',$this->ao->system->last_seen?->diffInDays($now))) ->addText("\r") ->addText("You have (waiting for collection):\r") - ->addText(sprintf("* %s Netmails\r",number_format($this->ao->uncollected_netmail))) - ->addText(sprintf("* %s Echomails\r",number_format($this->ao->uncollected_echomail))) - ->addText(sprintf("* %s Files\r",number_format($this->ao->uncollected_files))) + ->addText(sprintf('* %s Netmails',number_format($this->ao->netmailWaiting()->count()))) + ->addText(sprintf('* %s Echomails',number_format($this->ao->echomailWaiting()->count()))) + ->addText(sprintf('* %s Files',number_format($this->ao->filesWaiting()->count()))) ->addText("\r") ->addText(sprintf("To clear this status, all you need to do make sure your system polls and collects mail by **%s**\r\r",($this->ao->system->last_seen ?: Carbon::now())->addDays(config('fido.idle.down'))->format('Y-m-d'))) ->addText("If you think you've received this netmail by mistake or need help, please let me know.\r");