fix: FCM data-only push so Seaca controls sound (0.9.6)
Send title and body in the data payload instead of notification block so onMessageReceived always runs and the app can honour silent mode in background. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -141,13 +141,16 @@ def _send_fcm_data(
|
||||
}
|
||||
errors: list[str] = []
|
||||
|
||||
# Data-only: Android always calls SeacaMessagingService.onMessageReceived so the app
|
||||
# can honour per-device notification mode (sound / silent / off).
|
||||
message_data = {**data, "title": title, "body": body}
|
||||
|
||||
with httpx.Client(timeout=12.0) as client:
|
||||
for token in tokens:
|
||||
payload = {
|
||||
"message": {
|
||||
"token": token,
|
||||
"notification": {"title": title, "body": body},
|
||||
"data": data,
|
||||
"data": message_data,
|
||||
"android": {"priority": "high"},
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user