Misc bug fixes while testing

This commit is contained in:
Deon George 2022-02-03 17:35:52 +11:00
parent b65289af9f
commit a05ca1c2a4
5 changed files with 6 additions and 6 deletions

View File

@ -515,7 +515,7 @@ class Message extends FTNBase
} else { } else {
// Seenby & PATH - FSC-0068 // Seenby & PATH - FSC-0068
$return .= sprintf("SEEN-BY: %s\r",wordwrap(optimize_path($this->seenby)->join(' '),70,"\rSEEN-BY: ")); $return .= sprintf("SEEN-BY: %s\r",wordwrap(optimize_path($this->seenby)->join(' '),70,"\rSEEN-BY: "));
$return .= sprintf("\01PATH: %s\r",wordwrap(optimize_path($this->path)->join(' '),70,"\rPATH: ")); $return .= sprintf("\01PATH: %s\r",wordwrap(optimize_path($this->path)->join(' '),73,"\rPATH: "));
} }
$return .= "\00"; $return .= "\00";

View File

@ -127,7 +127,7 @@ final class Receive extends Item
} }
// Check the packet password // Check the packet password
if ($this->ao->session('pktpass') !== $po->password) { if ($this->ao->session('pktpass') != $po->password) {
Log::error(sprintf('%s: ! Packet from [%s] with password [%s] is invalid.',self::LOGKEY,$this->ao->ftn,$po->password)); Log::error(sprintf('%s: ! Packet from [%s] with password [%s] is invalid.',self::LOGKEY,$this->ao->ftn,$po->password));
// @todo Generate message to system advising invalid password - that message should be sent without a packet password! // @todo Generate message to system advising invalid password - that message should be sent without a packet password!
break; break;

View File

@ -56,7 +56,7 @@ class DomainController extends Controller
{ {
$oo = Address::where('role',Address::NODE_NC) $oo = Address::where('role',Address::NODE_NC)
->where('zone_id',$o->id) ->where('zone_id',$o->id)
->when($region,function($query,$region) { return $query->where('region_id',$region)->where('node_id',0); }) ->when($region,function($query,$region) { return $query->where('region_id',$region); })
->when((! $region),function($query) use ($region) { return $query->where('region_id',0); }) ->when((! $region),function($query) use ($region) { return $query->where('region_id',0); })
->where('point_id',0) ->where('point_id',0)
->FTNorder() ->FTNorder()
@ -77,7 +77,7 @@ class DomainController extends Controller
*/ */
public function api_hubs(Zone $o,int $host): Collection public function api_hubs(Zone $o,int $host): Collection
{ {
$oo = Address::where('role',self::NODE_HC) $oo = Address::where('role',Address::NODE_HC)
->where('zone_id',$o->id) ->where('zone_id',$o->id)
->when($host,function($query,$host) { return $query->where('host_id',$host)->where('node_id','<>',0); }) ->when($host,function($query,$host) { return $query->where('host_id',$host)->where('node_id','<>',0); })
->with(['system']) ->with(['system'])

View File

@ -283,7 +283,7 @@ class SystemController extends Controller
->where('zones.domain_id',$request->domain_id) ->where('zones.domain_id',$request->domain_id)
->FTNorder() ->FTNorder()
->get() ->get()
->map(function($item) { return ['id'=>$item->id,'value'=>$item->ftn3d]; }); ->map(function($item) { return ['id'=>(string)$item->id,'value'=>$item->ftn3d]; });
} }
/** /**

View File

@ -200,7 +200,7 @@ final class Echomail extends Model implements Packet
$o->origin = $this->origin; $o->origin = $this->origin;
$o->seenby = $this->seenby->pluck('ftn2d'); $o->seenby = $this->seenby->pluck('ftn2d');
$o->path = $this->path->pluck('ftn2d'); $o->path = $this->pathorder();
$o->packed = TRUE; $o->packed = TRUE;