Let multiple installations be updates if no critical values are set (#3040)

* Let multiple installations be updates if no critical values are set

* nits
This commit is contained in:
Florent Vilmart
2016-11-28 13:11:54 -05:00
committed by GitHub
parent b6fb3d8d51
commit 6676c6a4b9
3 changed files with 69 additions and 0 deletions

View File

@@ -1,4 +1,5 @@
import { ParsePubSub } from './ParsePubSub';
import Parse from 'parse/node';
import logger from '../logger';
class ParseCloudCodePublisher {

View File

@@ -624,6 +624,12 @@ RestWrite.prototype.handleInstallation = function() {
installationId = installationId.toLowerCase();
}
// Updating _Installation but not updating anything critical
if (this.query && !this.data.deviceToken
&& !installationId && !this.data.deviceType) {
return;
}
var promise = Promise.resolve();
var idMatch; // Will be a match on either objectId or installationId