matrix-org / sygnal

Sygnal: reference Push Gateway for Matrix
Apache License 2.0
167 stars 148 forks source link

Fix FCM second retry sends #331

Open Fizzadar opened 1 year ago

Fizzadar commented 1 year ago

When the first attempt succeeds for all but one pushkey the second attempt will end up populating both the to and registration_ids fields, which is rejected by FCM (400). For context, full errors looked like:

"[...] 400 from server, we have sent something invalid! Error: 'Must use either \"registration_ids\" field or \"to\", not both\\n'"