Skip to content

fix(push): send FCM order notifications with android high priority - #273

Merged
roncodes merged 1 commit into
release/v1.6.65from
fix/push-android-high-priority
Sep 28, 2026
Merged

roncodes merged 1 commit into
release/v1.6.65from
fix/push-android-high-priority

Conversation

@roncodes

Copy link
Copy Markdown
Member

Fixes #268.

Why

PushNotification::createFcmMessage() built FCM messages without an Android priority. Android held order pushes (OrderAssigned, OrderDispatched, …) while a driver's phone was in deep Doze, and delivered them only once the phone was unlocked or charged. FCM still accepted the message, so nothing on the server reported a problem.

The reporter ran a controlled test on the same device after about 60 minutes locked: the message as built today was not delivered, and the same message with android.priority = high arrived immediately.

What changed

  • createFcmMessage() sets android.priority = high. These are user-visible, time-sensitive notifications, which is the case FCM documents high priority for.
  • APNs is unchanged; alert pushes already default to apns-priority: 10.

Verification

  • The FCM message shape tests (PushNotificationTest, NotificationsAndMailTest) now expect priority: high.

Storefront builds its own FCM messages (storefront/server/src/Support/PushNotification.php), which probably needs the same change in that repo.

Without an explicit android.priority, Android held order pushes while the
device was in deep Doze and delivered them only when the phone was
unlocked or charged.

Closes #268

(cherry picked from commit 5bd2ba9232c4f7fced8d502f07ab0906418d3368)
@codecov

codecov Bot commented Sep 26, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (3965998) to head (68b1938).

Additional details and impacted files
@@             Coverage Diff             @@
##                main      #273   +/-   ##
===========================================
  Coverage     100.00%   100.00%           
  Complexity      7499      7499           
===========================================
  Files            430       430           
  Lines          24488     24489    +1     
===========================================
+ Hits           24488     24489    +1     
Flag Coverage Δ
backend 100.00% <100.00%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@roncodes roncodes mentioned this pull request Sep 28, 2026
@roncodes
roncodes changed the base branch from main to release/v1.6.65 September 28, 2026 03:28
@roncodes
roncodes merged commit 3a736fe into release/v1.6.65 Sep 28, 2026
7 checks passed
@roncodes
roncodes deleted the fix/push-android-high-priority branch September 28, 2026 03:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Order push notifications are sent without android.priority, so they are held while the device is in Doze

1 participant