Skip to content

Commit

Permalink
Merge 037ba01 into 0fe49e6
Browse files Browse the repository at this point in the history
  • Loading branch information
vitalyster committed Feb 7, 2020
2 parents 0fe49e6 + 037ba01 commit 44af1e7
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
3 changes: 2 additions & 1 deletion src/sendGCM.js
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,8 @@ const sendGCM = (regIds, data, settings) => {
body_loc_args: data.locArgs, // Android, iOS
title_loc_key: data.titleLocKey, // Android, iOS
title_loc_args: data.titleLocArgs, // Android, iOS
android_channel_id: data.android_channel_id, // Android
channel_id: data.android_channel_id, // Android
notification_count: data.notificationCount || data.badge, // Android
};

let custom;
Expand Down
6 changes: 3 additions & 3 deletions test/send/sendGCM.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ const data = {
custom: {
sender: 'appfeel-test',
},
badge: 42,
};
const gcmOpts = {
gcm: {
Expand Down Expand Up @@ -193,6 +194,7 @@ describe('push-notifications-gcm', () => {
expect(message.params.data.sound).to.be.undefined();
expect(message.params.data.icon).to.equal('myicon.png');
expect(message.params.data.msgcnt).to.equal(2);
expect(message.params.notification.notification_count).to.eql(42);
cb(null, {
multicast_id: 'abc',
success: registrationTokens.length,
Expand Down Expand Up @@ -693,9 +695,7 @@ describe('push-notifications-gcm', () => {
registrationTokens.forEach(regId => expect(regIds).to.include(regId));
expect(retries).to.be.a('number');
expect(message).to.be.instanceOf(gcm.Message);
expect(message.params.notification.android_channel_id).to.equal(
'channelId'
);
expect(message.params.notification.channel_id).to.equal('channelId');
expect(message.params.notification.image).to.equal('imageData');
expect(message.params.notification.style).to.equal('some-style');
expect(message.params.notification.picture).to.equal(
Expand Down

0 comments on commit 44af1e7

Please sign in to comment.