From 11b7dc4229f02fda84b93505f3d464ff5ece79e4 Mon Sep 17 00:00:00 2001 From: Deon George Date: Tue, 25 Jun 2024 09:01:28 +1000 Subject: [PATCH] Fix presenting PATH/SEENBY when point_id is null --- app/Classes/FTN/Message.php | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/app/Classes/FTN/Message.php b/app/Classes/FTN/Message.php index bdc07cd..695c975 100644 --- a/app/Classes/FTN/Message.php +++ b/app/Classes/FTN/Message.php @@ -551,7 +551,12 @@ class Message extends FTNBase // 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 - $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 $seenby = $this->mo->seenby; @@ -565,7 +570,7 @@ class Message extends FTNBase $seenby = $seenby ->push($this->us) - ->filter(fn($item)=>($item->point_id === 0)) + ->filter(fn($item)=>is_null($item->point_id) || ($item->point_id === 0)) ->unique('ftn') ->sortBy(function($item) { return sprintf('%05d%05d',$item->host_id,$item->node_id);});