diff --git a/app/Classes/FTN/Packet.php b/app/Classes/FTN/Packet.php index 886d7d3..da6f910 100644 --- a/app/Classes/FTN/Packet.php +++ b/app/Classes/FTN/Packet.php @@ -112,7 +112,7 @@ class Packet extends FTNBase implements \Iterator, \Countable * Open a packet file * * @param File $file - * @param Zone|null $zone + * @param System|null $system * @param bool $use_redis * @return Packet * @throws InvalidPacketException diff --git a/app/Jobs/MessageProcess.php b/app/Jobs/MessageProcess.php index 1329ea6..96e4a97 100644 --- a/app/Jobs/MessageProcess.php +++ b/app/Jobs/MessageProcess.php @@ -166,6 +166,14 @@ class MessageProcess implements ShouldQueue if (! $o->msg_crc) $o->msg_crc = md5($this->msg->message); + // Using filter here, due to earlier bugs - and to get rid of the null values + $o->path = collect($o->getRawOriginal('path'))->filter()->toArray(); + + // If the path is empty, then its probably because of the previous bug, we'll replace it. + // @todo This duplicate message may have gone via a different path, be nice to record it. + if (! $o->path->count()) + $o->path = collect($o->getRawOriginal('path'))->merge($this->msg->pathaddress)->toArray(); + $o->seenby = collect($o->getRawOriginal('seenby'))->merge($this->msg->seenaddress)->filter()->toArray(); $o->save();