Update: 2026-07-09 01:55:25
This commit is contained in:
@@ -349,7 +349,7 @@ function notifyPassengerOnRideServer($passenger_id, $payload) {
|
||||
// ============================================================================
|
||||
// دالة توزيع الطلب (Dispatch Function) - النسخة المصححة
|
||||
// ============================================================================
|
||||
function dispatchRideToDrivers($driversData, $rideId, $payloadTemplate, $startNameLoc, $encryptionHelper) {
|
||||
function dispatchRideToDrivers($driversData, $rideId, $payloadTemplate, $startNameLoc, $encryptionHelper, $extraFcmData = []) {
|
||||
$countDrivers = count($driversData);
|
||||
error_log("🚀 [DISPATCH_START] RideID: $rideId | Drivers Count: $countDrivers");
|
||||
|
||||
@@ -377,11 +377,11 @@ function dispatchRideToDrivers($driversData, $rideId, $payloadTemplate, $startNa
|
||||
|
||||
// 3. إرسال FCM
|
||||
if (!empty($driverToken)) {
|
||||
$fcmData = [
|
||||
$fcmData = array_merge([
|
||||
'DriverList' => $payloadForDriver,
|
||||
'order_id' => (string)$rideId
|
||||
];
|
||||
|
||||
], $extraFcmData);
|
||||
|
||||
// 🆕 Destination Match Indicator
|
||||
$title = "طلب جديد 🔔";
|
||||
if (!empty($driver['is_destination_match'])) {
|
||||
|
||||
Reference in New Issue
Block a user