Include children in netmail for a host

This commit is contained in:
Deon George 2023-12-18 09:26:50 +11:00
parent e1c9fa12aa
commit fd07fb2be7

View File

@ -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();