From d3c8bc844a8d3313055f376982a65d3042039f7e Mon Sep 17 00:00:00 2001 From: Deon George Date: Wed, 26 Jun 2024 22:44:31 +1000 Subject: [PATCH] Fix calls to deprecated getDateAttribute() for mail packets --- app/Classes/FTN/Packet.php | 2 +- app/Classes/FTN/Packet/FSC48.php | 2 +- app/Classes/File/Mail.php | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/Classes/FTN/Packet.php b/app/Classes/FTN/Packet.php index 9e83c50..2d93f33 100644 --- a/app/Classes/FTN/Packet.php +++ b/app/Classes/FTN/Packet.php @@ -361,7 +361,7 @@ abstract class Packet extends FTNBase implements \Iterator, \Countable $this->content .= "\00\00"; - $this->messages = $msgs->map(fn($item)=>$item->only(['id','date'])); + $this->messages = $msgs->map(fn($item)=>$item->only(['id','datetime'])); return $this; } diff --git a/app/Classes/FTN/Packet/FSC48.php b/app/Classes/FTN/Packet/FSC48.php index 09fbe3b..809cfff 100644 --- a/app/Classes/FTN/Packet/FSC48.php +++ b/app/Classes/FTN/Packet/FSC48.php @@ -65,7 +65,7 @@ final class FSC48 extends Packet */ protected function header(Collection $msgs): string { - $oldest = $msgs->sortBy('date')->last(); + $oldest = $msgs->sortBy('datetime')->last(); return pack(collect(self::HEADER)->pluck(1)->join(''), $this->fftn_p->node_id, // Orig Node diff --git a/app/Classes/File/Mail.php b/app/Classes/File/Mail.php index 55441a2..23ff70d 100644 --- a/app/Classes/File/Mail.php +++ b/app/Classes/File/Mail.php @@ -116,6 +116,6 @@ final class Mail extends Send private function youngest(): Carbon { - return $this->f->messages->pluck('date')->sort()->last(); + return $this->f->messages->pluck('datetime')->sort()->last(); } } \ No newline at end of file