Additional fixes for 14616471
All checks were successful
Create Docker Image / Build Docker Image (x86_64) (push) Successful in 27s
Create Docker Image / Build Docker Image (arm64) (push) Successful in 1m34s
Create Docker Image / Final Docker Image Manifest (push) Successful in 8s

This commit is contained in:
Deon George 2025-04-17 14:18:15 +10:00
parent 99dc13b297
commit 9387ee7dc4

View File

@ -976,14 +976,13 @@ class Address extends Model
/** /**
* Echomail waiting to be sent to this address * Echomail waiting to be sent to this address
* *
* @return Collection * @return Builder
*/ */
public function echomailWaiting(): Collection public function echomailWaiting(): Builder
{ {
return Echomail::Uncollected() return Echomail::Uncollected()
->where('address_id',$this->id) ->where('address_id',$this->id)
->orderby('id') ->orderby('id');
->get();
} }
/** /**
@ -993,22 +992,20 @@ class Address extends Model
*/ */
public function echomailWaitingCount(): int public function echomailWaitingCount(): int
{ {
return Echomail::Uncollected() return $this->echomailWaiting()
->where('address_id',$this->id)
->count(); ->count();
} }
/** /**
* Files waiting to be sent to this address * Files waiting to be sent to this address
* *
* @return Collection * @return Builder
*/ */
public function filesWaiting(): Collection public function filesWaiting(): Builder
{ {
return File::Uncollected() return File::Uncollected()
->where('address_id',$this->id) ->where('address_id',$this->id)
->orderby('id') ->orderby('id');
->get();
} }
/** /**
@ -1018,8 +1015,7 @@ class Address extends Model
*/ */
public function filesWaitingCount(): int public function filesWaitingCount(): int
{ {
return File::Uncollected() return $this->filesWaiting()
->where('address_id',$this->id)
->count(); ->count();
} }
@ -1169,16 +1165,14 @@ class Address extends Model
} }
/** /**
* Count of echomail waiting to be sent to this address * Count of netmail waiting to be sent to this address
* *
* @return int * @return int
* @throws \Exception
*/ */
public function netmailWaitingCount(): int public function netmailWaitingCount(): int
{ {
return Netmail::Uncollected() return $this->netmailWaiting()
->whereIn('tftn_id',$this->downlinks()
->add($this)
->pluck('id'))
->count(); ->count();
} }