Fix file sending, as a result of moving $size into Send::class when optimising mail sending
This commit is contained in:
@@ -1043,9 +1043,20 @@ class Address extends Model
|
||||
*/
|
||||
public function filesWaiting(): Collection
|
||||
{
|
||||
return $this->file_seen()
|
||||
->whereNull('sent_at')
|
||||
return File::select('files.*')
|
||||
->join('file_seenby',['file_seenby.file_id'=>'files.id'])
|
||||
->where('address_id',$this->id)
|
||||
->whereNull('files.deleted_at')
|
||||
->whereNotNull('export_at')
|
||||
->whereNull('sent_at')
|
||||
->orderby('id')
|
||||
->with([
|
||||
'filearea:id,name,domain_id',
|
||||
'filearea.domain:id,name',
|
||||
'fftn:id,zone_id,host_id,node_id,point_id',
|
||||
'fftn.zone:id,domain_id,zone_id',
|
||||
'fftn.zone.domain:id,name',
|
||||
])
|
||||
->get();
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user