Skip to content

Commit

Permalink
🔨 Add bundleId option on register
Browse files Browse the repository at this point in the history
Patrick-Remy committed Jul 23, 2021

Verified

This commit was signed with the committer’s verified signature. The key has expired.
Patrick-Remy Patrick Remy
1 parent feb64e8 commit ca873ea
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/register/index.js
Original file line number Diff line number Diff line change
@@ -4,9 +4,9 @@ const registerFCM = require('../fcm');

module.exports = register;

async function register(senderId) {
async function register(senderId, { bundleId } = { bundleId : 'receiver.push.com' }) {
// Should be unique by app - One GCM registration/token by app/appId
const appId = `wp:receiver.push.com#${uuidv4()}`;
const appId = `wp:${bundleId}#${uuidv4()}`;
const subscription = await registerGCM(appId);
const result = await registerFCM({
token : subscription.token,

0 comments on commit ca873ea

Please sign in to comment.