Missed an Address::poll() when linking to an existing system

This commit is contained in:
Deon George 2023-08-10 11:09:55 +10:00
parent 5a62d69913
commit 462004c9c9
1 changed files with 5 additions and 2 deletions

View File

@ -693,6 +693,7 @@ class SystemController extends Controller
return redirect()->to(sprintf('ftn/system/addedit/%d',$o->system_id));
}
// @todo Can this be consolidated with system_register()
public function system_link(Request $request)
{
if (! $request->system_id)
@ -738,8 +739,10 @@ class SystemController extends Controller
$validate = Setup::findOrFail(config('app.id'))->system->inMyZones($o->addresses);
// If we have addresses, we'll trigger the routed netmail
if ($validate->count())
Notification::route('netmail',$validate->first())->notify(new AddressLink(Auth::user()));
if ($validate->count()) {
Notification::route('netmail',$x=$validate->first())->notify(new AddressLink(Auth::user()));
AddressPoll::dispatch($x)->delay(15);
}
return view('user.system.widget.register_send')
->with('validate',$validate)