Refactor pushStatusHandler to use Parse instead of direct access (#4173)
* Refactors pushStatusHandler to use HTTP interface so we can bind CloudCode hooks * Handle correctly nested dot atomic operations * Better handling of restricted class names, add support for afterSave _PushStatus * Adds simple testing for afterSave(PushStatus) * Reverts jobStatusHandler * Addresses fixes * adds delays to all methods
This commit is contained in:
@@ -52,6 +52,7 @@ export class PushWorker {
|
||||
const auth = master(config);
|
||||
const where = utils.applyDeviceTokenExists(query.where);
|
||||
delete query.where;
|
||||
pushStatus = pushStatusHandler(config, pushStatus.objectId);
|
||||
return rest.find(config, auth, '_Installation', where, query).then(({results}) => {
|
||||
if (results.length == 0) {
|
||||
return;
|
||||
@@ -63,7 +64,6 @@ export class PushWorker {
|
||||
}
|
||||
|
||||
sendToAdapter(body: any, installations: any[], pushStatus: any, config: Config, UTCOffset: ?any): Promise<*> {
|
||||
pushStatus = pushStatusHandler(config, pushStatus.objectId);
|
||||
// Check if we have locales in the push body
|
||||
const locales = utils.getLocalesFromPush(body);
|
||||
if (locales.length > 0) {
|
||||
|
||||
Reference in New Issue
Block a user