Skip to content

Commit 627b219

Browse files
committed
Set installation to fcm now.
The push adapter actually ignores the push type and falls back to the device type. It should be OK to classify these pushes as FCM. https://github.com/parse-community/parse-server-push-adapter/blob/master/src/PushAdapterUtils.js#L20 https://github.com/parse-community/parse-server-push-adapter/blob/master/src/ParsePushAdapter.js#L35 We should move off the parse-server GCM module because the FCM send only needs the GCloud project instead of sender ID.
1 parent ffea69f commit 627b219

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

fcm/src/main/java/com/parse/fcm/ParseFirebaseJobService.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
public class ParseFirebaseJobService extends JobService {
2727

2828
private static final String JOB_TAG_UPLOAD_TOKEN = "upload-token";
29+
private static final String PUSH_TYPE = "fcm";
2930

3031
static Job createJob(FirebaseJobDispatcher dispatcher) {
3132
return dispatcher.newJobBuilder()
@@ -50,7 +51,7 @@ public boolean onStartJob(final JobParameters job) {
5051
if (installation != null && token != null) {
5152
installation.setDeviceToken(token);
5253
//even though this is FCM, calling it gcm will work on the backend
53-
installation.setPushType("gcm");
54+
installation.setPushType(PUSH_TYPE);
5455
installation.saveInBackground(new SaveCallback() {
5556
@Override
5657
public void done(ParseException e) {

0 commit comments

Comments
 (0)