Fixes for TIC processing and not identifying path/seenby correctly

This commit is contained in:
Deon George 2023-10-29 21:26:57 +11:00
parent 7d82cbcf12
commit 85243d128e

View File

@ -83,7 +83,6 @@ class File extends Model
$seenby = collect();
$path = collect();
$so = Setup::findOrFail(config('app.id'));
$zone = $model->fftn->zone;
// Parse PATH
@ -125,11 +124,11 @@ class File extends Model
$model->set_seenby = $model->set_seenby->merge($path->pluck('address.ftn3d'))->unique()->filter();
foreach ($model->set_seenby as $sb) {
$ftn = Address::parseFTN($x);
$ftn = Address::parseFTN($sb);
$ao = ($zone->domain->flatten)
? Address::findZone($zone->domain,$ftn['n'],$ftn['f'],0)
: Address::findFTN($x);
: Address::findFTN($sb);
if ($ao)
$seenby->push($ao->id);
@ -149,7 +148,7 @@ class File extends Model
->addresses
->filter(function($item) use ($model) { return $item->security >= $model->filearea->sec_read; })
->pluck('id')
->diff($model->set_seenby);
->diff($seenby);
if ($exportto->count()) {
if ($model->no_export) {
@ -229,4 +228,4 @@ class File extends Model
{
return $this->encode();
}
}
}