Attach jo_id to all fcm notifications #730

This commit is contained in:
Ramon Gutierrez 2023-06-14 17:14:59 +08:00
parent 31c0f4a102
commit c2418b117e

View file

@ -71,8 +71,6 @@ class FCMSender
foreach ($sessions as $sess) {
$device_id = $sess->getDevicePushID();
error_log($sess->getID());
if (!empty($device_id)) {
// send fcm notification
$device_ids[] = $device_id;
@ -84,6 +82,9 @@ class FCMSender
return;
}
// attach jo id
$data['jo_id'] = $job_order->getID();
// send fcm notification
$result = $this->send($device_ids, $this->translator->trans($title), $this->translator->trans($body), $data);