From 462004c9c9a0a727cb554c2e27495455fbef2951 Mon Sep 17 00:00:00 2001 From: Deon George Date: Thu, 10 Aug 2023 11:09:55 +1000 Subject: [PATCH] Missed an Address::poll() when linking to an existing system --- app/Http/Controllers/SystemController.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/app/Http/Controllers/SystemController.php b/app/Http/Controllers/SystemController.php index 73b6f12..9637aed 100644 --- a/app/Http/Controllers/SystemController.php +++ b/app/Http/Controllers/SystemController.php @@ -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)