System::match() now returns an array

This commit is contained in:
Deon George
2021-08-08 23:53:56 +10:00
parent 7922bc6a7a
commit 7ec01d778a
4 changed files with 5 additions and 5 deletions

View File

@@ -28,7 +28,7 @@ final class Ping extends Process
return FALSE;
Log::info(sprintf('Processing PING message from (%s) [%s]',$msg->user_from,$msg->fftn));
$ftns = Setup::findOrFail(config('app.id'))->system->match($msg->fftn_o->zone);
$ftns = Setup::findOrFail(config('app.id'))->system->match($msg->fftn_o->zone)->first();
$reply = sprintf("Your ping was received here on %s and it looks like you sent it on %s. If that is correct, then it took %s to get here.\r",
$msg->date->toDateTimeString(),
@@ -50,7 +50,7 @@ final class Ping extends Process
$o->tzoffset = $o->datetime->utcOffset();
$o->reply = $msg->msgid;
$o->fftn_id = $ftns->first()->id;
$o->fftn_id = $ftns->id;
$o->tftn_id = ($x=$msg->fftn_o) ? $x->id : NULL;
$o->flags = Message::FLAG_LOCAL;
$o->cost = 0;