From 82cee02fa800dae1f1449f35505b5b3e83b2ce11 Mon Sep 17 00:00:00 2001 From: Deon George Date: Fri, 24 Nov 2023 23:20:38 +1100 Subject: [PATCH] Dont included deleted_at items for the status --- app/Http/Controllers/HomeController.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app/Http/Controllers/HomeController.php b/app/Http/Controllers/HomeController.php index 366bedd..ba327f6 100644 --- a/app/Http/Controllers/HomeController.php +++ b/app/Http/Controllers/HomeController.php @@ -254,6 +254,7 @@ class HomeController extends Controller ->join('echomails',['echomails.id'=>'echomail_seenby.echomail_id']) ->whereNotNull('export_at') ->whereNull('sent_at') + ->whereNull('echomails.deleted_at') ->where('datetime','<',$date) ->groupBy('addresses.id'); @@ -264,6 +265,7 @@ class HomeController extends Controller ->orWhereRaw(sprintf('(flags & %d) > 0',Message::FLAG_LOCAL)); }) ->whereRaw(sprintf('(flags & %d) = 0',Message::FLAG_SENT)) + ->whereNull('netmails.deleted_at') ->where('datetime','<',$date) ->groupBy('addresses.id'); @@ -272,6 +274,7 @@ class HomeController extends Controller ->join('files',['files.id'=>'file_seenby.file_id']) ->whereNotNull('export_at') ->whereNull('sent_at') + ->whereNull('files.deleted_at') ->where('datetime','<',$date) ->groupBy('addresses.id');