Fix presenting PATH/SEENBY when point_id is null
All checks were successful
Create Docker Image / Build Docker Image (x86_64) (push) Successful in 36s
Create Docker Image / Build Docker Image (arm64) (push) Successful in 1m47s
Create Docker Image / Final Docker Image Manifest (push) Successful in 9s

This commit is contained in:
Deon George 2024-06-25 09:01:28 +10:00
parent 8b4e2cb9f0
commit 11b7dc4229

View File

@ -551,7 +551,12 @@ class Message extends FTNBase
// FTS-0004.001/FSC-0068.001 The message PATH lines // FTS-0004.001/FSC-0068.001 The message PATH lines
// @todo This unique() function here shouldnt be required, but is while system generated messages are storing path/seenby // @todo This unique() function here shouldnt be required, but is while system generated messages are storing path/seenby
$path = $this->mo->path->push($this->us)->unique('ftn')->filter(fn($item)=>($item->point_id === 0)); $path = $this
->mo
->path
->push($this->us)
->unique('ftn')
->filter(fn($item)=>is_null($item->point_id) || ($item->point_id === 0));
// Create our rogue seenby objects // Create our rogue seenby objects
$seenby = $this->mo->seenby; $seenby = $this->mo->seenby;
@ -565,7 +570,7 @@ class Message extends FTNBase
$seenby = $seenby $seenby = $seenby
->push($this->us) ->push($this->us)
->filter(fn($item)=>($item->point_id === 0)) ->filter(fn($item)=>is_null($item->point_id) || ($item->point_id === 0))
->unique('ftn') ->unique('ftn')
->sortBy(function($item) { return sprintf('%05d%05d',$item->host_id,$item->node_id);}); ->sortBy(function($item) { return sprintf('%05d%05d',$item->host_id,$item->node_id);});