Prefix default push channel with applicationId (#4182)
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
import { ParseMessageQueue } from '../ParseMessageQueue';
|
||||
import rest from '../rest';
|
||||
import { applyDeviceTokenExists } from './utils';
|
||||
import Parse from 'parse/node';
|
||||
|
||||
const PUSH_CHANNEL = 'parse-server-push';
|
||||
const DEFAULT_BATCH_SIZE = 100;
|
||||
@@ -13,13 +14,13 @@ export class PushQueue {
|
||||
// config object of the publisher, right now it only contains the redisURL,
|
||||
// but we may extend it later.
|
||||
constructor(config: any = {}) {
|
||||
this.channel = config.channel || PUSH_CHANNEL;
|
||||
this.channel = config.channel || PushQueue.defaultPushChannel();
|
||||
this.batchSize = config.batchSize || DEFAULT_BATCH_SIZE;
|
||||
this.parsePublisher = ParseMessageQueue.createPublisher(config);
|
||||
}
|
||||
|
||||
static defaultPushChannel() {
|
||||
return PUSH_CHANNEL;
|
||||
return `${Parse.applicationId}-${PUSH_CHANNEL}`;
|
||||
}
|
||||
|
||||
enqueue(body, where, config, auth, pushStatus) {
|
||||
|
||||
Reference in New Issue
Block a user