From a687b5fd1c74b0c4b6bbc06e67922850dca07e24 Mon Sep 17 00:00:00 2001 From: Deon George Date: Fri, 24 May 2024 09:28:17 +1000 Subject: [PATCH] Change looking for mail waiting for downlinks() instead of children() --- app/Models/Address.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/Models/Address.php b/app/Models/Address.php index 924e725..ef4aa83 100644 --- a/app/Models/Address.php +++ b/app/Models/Address.php @@ -1163,7 +1163,7 @@ class Address extends Model $netmails = $this ->UncollectedNetmail() ->select('netmails.id') - ->whereIn('addresses.id',$this->children()->add($this)->pluck('id')) + ->whereIn('addresses.id',$this->downlinks()->add($this)->pluck('id')) ->groupBy(['netmails.id']) ->get(); @@ -1185,7 +1185,7 @@ class Address extends Model ->whereRaw(sprintf('(flags & %d) > 0',Message::FLAG_PKTPASSWD)) ->whereRaw(sprintf('(flags & %d) = 0',Message::FLAG_SENT)) ->select('netmails.id') - ->whereIn('addresses.id',$this->children()->add($this)->pluck('id')) + ->whereIn('addresses.id',$this->downlinks()->add($this)->pluck('id')) ->groupBy(['netmails.id']) ->get();