Administration -> Settings -> Push -> Gateway
If I set multiple push notification gatways rocketchat server send only to first one
(Multiple lines can be used to specify multiple gateways)
Beсause:
https://github.com/RocketChat/Rocket.Chat/blob/develop/apps/meteor/app/push/server/push.ts#L270
in
private async sendNotificationGateway(
in such "for" logics will work only one time and will exit from a "for" loop after first "return this.sendGatewayPush..." and will not try next gateway from a "this.options.gateways" list.
`for (const gateway of this.options.gateways) {
logger.debug('send to token', app.token);
if ('apn' in app.token && app.token.apn) {
countApn.push(app._id);
return this.sendGatewayPush(gateway, 'apn', app.token.apn, { topic: app.appName, ...gatewayNotification });
}
if ('gcm' in app.token && app.token.gcm) {
countGcm.push(app._id);
return this.sendGatewayPush(gateway, 'gcm', app.token.gcm, gatewayNotification);
}
}`
Administration -> Settings -> Push -> Gateway
If I set multiple push notification gatways rocketchat server send only to first one
(Multiple lines can be used to specify multiple gateways)
Beсause:
https://github.com/RocketChat/Rocket.Chat/blob/develop/apps/meteor/app/push/server/push.ts#L270
in
private async sendNotificationGateway(
in such "for" logics will work only one time and will exit from a "for" loop after first "return this.sendGatewayPush..." and will not try next gateway from a "this.options.gateways" list.
`for (const gateway of this.options.gateways) {
logger.debug('send to token', app.token);