Update: 2026-06-30 22:10:05
This commit is contained in:
@@ -13,7 +13,7 @@ class FcmService
|
|||||||
{
|
{
|
||||||
$this->redis = $redis;
|
$this->redis = $redis;
|
||||||
// المسار بناء على بنية المشروع
|
// المسار بناء على بنية المشروع
|
||||||
$this->serviceAccountFile = getenv('SERVICE_ACCOUNT_FILE_PATH') ?: getenv('FIREBASE_SERVICE_ACCOUNT_PATH');
|
$this->serviceAccountFile = getenv('FIREBASE_SERVICE_ACCOUNT_PATH');
|
||||||
}
|
}
|
||||||
|
|
||||||
// ── إرسال إشعار ────────────────────────────────────────
|
// ── إرسال إشعار ────────────────────────────────────────
|
||||||
@@ -60,8 +60,8 @@ class FcmService
|
|||||||
'data' => $processedData,
|
'data' => $processedData,
|
||||||
'android' => ['priority' => 'HIGH'],
|
'android' => ['priority' => 'HIGH'],
|
||||||
'apns' => [
|
'apns' => [
|
||||||
'headers' => ['apns-priority' => '10'],
|
'headers' => ['apns-priority' => '10', 'apns-push-type' => 'background'],
|
||||||
'payload' => ['aps' => []],
|
'payload' => ['aps' => ['content-available' => 1]],
|
||||||
],
|
],
|
||||||
],
|
],
|
||||||
];
|
];
|
||||||
@@ -71,11 +71,6 @@ class FcmService
|
|||||||
'title' => $title,
|
'title' => $title,
|
||||||
'body' => $body,
|
'body' => $body,
|
||||||
];
|
];
|
||||||
$payload['message']['apns']['headers']['apns-push-type'] = 'alert';
|
|
||||||
$payload['message']['apns']['payload']['aps']['sound'] = $tone === 'ding' ? 'default' : $tone;
|
|
||||||
} else {
|
|
||||||
$payload['message']['apns']['headers']['apns-push-type'] = 'background';
|
|
||||||
$payload['message']['apns']['payload']['aps']['content-available'] = 1;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
$ch = curl_init($fcmUrl);
|
$ch = curl_init($fcmUrl);
|
||||||
|
|||||||
Reference in New Issue
Block a user