Change looking for mail waiting for downlinks() instead of children()

This commit is contained in:
Deon George 2024-05-24 09:28:17 +10:00
parent 27956146e3
commit a687b5fd1c

View File

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