Update: 2026-07-23 21:05:22

This commit is contained in:
Hamza-Ayed
2026-07-23 21:05:22 +03:00
parent 7d646b579b
commit e7aa28fe3d
2 changed files with 8 additions and 2 deletions
+4 -1
View File
@@ -23,6 +23,9 @@ function resolveFCMServiceAccountPath($serviceAccountPath = null) {
if (file_exists('/keys/firebase_service_account.json')) {
return '/keys/firebase_service_account.json';
}
if (file_exists(__DIR__ . '/../../keys/firebase_service_account.json')) {
return __DIR__ . '/../../keys/firebase_service_account.json';
}
return __DIR__ . '/service-account.json';
}
@@ -130,7 +133,7 @@ function sendFCMNotification($params) {
'headers' => ['apns-priority' => '10'],
'payload' => [
'aps' => [
'sound' => $tone . '.caf',
'sound' => ($tone === 'ding' || $tone === 'default') ? 'default' : (str_ends_with($tone, '.caf') ? $tone : $tone . '.caf'),
'content-available' => 1
]
]
+4 -1
View File
@@ -19,6 +19,9 @@ function resolveServiceAccountPath(): string {
if (file_exists('/keys/firebase_service_account.json')) {
return '/keys/firebase_service_account.json';
}
if (file_exists(__DIR__ . '/../../keys/firebase_service_account.json')) {
return __DIR__ . '/../../keys/firebase_service_account.json';
}
return __DIR__ . '/service-account.json';
}
@@ -125,7 +128,7 @@ $messagePayload = [
'headers' => ['apns-priority' => '10'],
'payload' => [
'aps' => [
'sound' => $tone . '.caf',
'sound' => ($tone === 'ding' || $tone === 'default') ? 'default' : (str_ends_with($tone, '.caf') ? $tone : $tone . '.caf'),
'content-available' => 1
]
]