Skip to content

Commit c76e938

Browse files
Merge pull request #5619 from Countly/SER-1993-push-token-gets-revoked-on-device-request-if-its-already-in-db
[push] shouldn't revoke the token if its already in db
2 parents 32ce8ba + 23cb989 commit c76e938

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

plugins/push/api/api-push.js

+5-5
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ ipc.attach();
9191

9292
/**
9393
* Process token session request
94-
*
94+
*
9595
* @param {Object} msg IPC message
9696
*/
9797
async function processTokenSession(msg) {
@@ -146,10 +146,10 @@ async function processTokenSession(msg) {
146146
});
147147
}, 10000);
148148
}
149-
else {
150-
appusersCollection.updateOne({_id: app_user_id}, {$unset: {[appusersField]: 1}}, function() {});
151-
pushCollection.updateOne({_id: uid}, {$unset: {[pushField]: 1}}, function() {});
152-
}
149+
// else {
150+
// appusersCollection.updateOne({_id: app_user_id}, {$unset: {[appusersField]: 1}}, function() {});
151+
// pushCollection.updateOne({_id: uid}, {$unset: {[pushField]: 1}}, function() {});
152+
// }
153153
}
154154

155155
module.exports.onTokenSession = async(dbAppUser, params) => {

0 commit comments

Comments
 (0)