From 502e9a11cdac3bd0f2a4327bb1919b72a2962166 Mon Sep 17 00:00:00 2001 From: Ramon Gutierrez Date: Wed, 11 Oct 2023 15:39:07 +0800 Subject: [PATCH] Add customer vehicle id to insurance FCM notifications #761 --- src/Controller/InsuranceController.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/Controller/InsuranceController.php b/src/Controller/InsuranceController.php index 329cc59b..91b1b855 100644 --- a/src/Controller/InsuranceController.php +++ b/src/Controller/InsuranceController.php @@ -80,7 +80,9 @@ class InsuranceController extends Controller $this->em->flush(); // send notification - $this->fcmclient->sendEvent($obj->getCustomer(), "insurance_fcm_title_completed", "insurance_fcm_body_completed"); + $this->fcmclient->sendEvent($obj->getCustomer(), "insurance_fcm_title_completed", "insurance_fcm_body_completed", [ + 'cv_id' => $obj->getCustomerVehicle()->getID(), + ]); } return $this->json([ @@ -108,7 +110,9 @@ class InsuranceController extends Controller $this->em->flush(); // send notification - $this->fcmclient->sendEvent($obj->getCustomer(), "insurance_fcm_title_updated", "insurance_fcm_body_updated"); + $this->fcmclient->sendEvent($obj->getCustomer(), "insurance_fcm_title_updated", "insurance_fcm_body_updated", [ + 'cv_id' => $obj->getCustomerVehicle()->getID(), + ]); } return $this->json([