From fd07fb2be7f06e3c69b0193f478605c6c5b1c430 Mon Sep 17 00:00:00 2001 From: Deon George Date: Mon, 18 Dec 2023 09:26:50 +1100 Subject: [PATCH] Include children in netmail for a host --- 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 dd2b994..9b5f370 100644 --- a/app/Models/Address.php +++ b/app/Models/Address.php @@ -835,7 +835,7 @@ class Address extends Model $netmails = $this ->UncollectedNetmail() ->select('netmails.id') - ->where('addresses.id',$this->id) + ->whereIn('addresses.id',$this->children()->add($this)->pluck('id')) ->groupBy(['netmails.id']) ->get(); @@ -855,7 +855,7 @@ class Address extends Model ->whereRaw(sprintf('(flags & %d) > 0',Message::FLAG_PKTPASSWD)) ->whereRaw(sprintf('(flags & %d) = 0',Message::FLAG_SENT)) ->select('netmails.id') - ->where('addresses.id',$this->id) + ->whereIn('addresses.id',$this->children()->add($this)->pluck('id')) ->groupBy(['netmails.id']) ->get();