diff --git a/apps/meteor/app/push/server/apn.ts b/apps/meteor/app/push/server/apn.ts index 1794a288632..e64bf08c1c7 100644 --- a/apps/meteor/app/push/server/apn.ts +++ b/apps/meteor/app/push/server/apn.ts @@ -65,7 +65,7 @@ export const sendAPN = ({ note.payload.messageFrom = notification.from; note.priority = priority; - note.topic = `${notification.topic}${notification.apn?.topicSuffix || ''}`; + note.topic = notification.topic; note.mutableContent = true; void apnConnection.send(note, userToken).then((response) => { diff --git a/apps/meteor/app/push/server/definition.ts b/apps/meteor/app/push/server/definition.ts index 39ab94de0a3..c849d06c11b 100644 --- a/apps/meteor/app/push/server/definition.ts +++ b/apps/meteor/app/push/server/definition.ts @@ -26,7 +26,6 @@ export type PendingPushNotification = { notId?: number; apn?: { category?: string; - topicSuffix?: string; }; gcm?: { style?: string; diff --git a/apps/meteor/app/push/server/push.ts b/apps/meteor/app/push/server/push.ts index fe08f7b0a21..a80631d335b 100644 --- a/apps/meteor/app/push/server/push.ts +++ b/apps/meteor/app/push/server/push.ts @@ -201,13 +201,12 @@ class PushClass { } private getGatewayNotificationData(notification: PendingPushNotification): Omit { - // Gateway accepts every attribute from the PendingPushNotification type, except for the priority and apn.topicSuffix - const { priority: _priority, apn, ...notifData } = notification; - const { topicSuffix: _topicSuffix, ...apnData } = apn || ({} as RequiredField['apn']); + // Gateway currently accepts every attribute from the PendingPushNotification type, except for the priority + // If new attributes are added to the PendingPushNotification type, they'll need to be removed here as well. + const { priority: _priority, ...notifData } = notification; return { ...notifData, - ...(notification.apn ? { apn: { ...apnData } } : {}), }; } @@ -221,8 +220,6 @@ class PushClass { return; } - const { topicSuffix = '' } = notification.apn || {}; - const gatewayNotification = this.getGatewayNotificationData(notification); for (const gateway of this.options.gateways) { @@ -230,7 +227,7 @@ class PushClass { if ('apn' in app.token && app.token.apn) { countApn.push(app._id); - return this.sendGatewayPush(gateway, 'apn', app.token.apn, { topic: `${app.appName}${topicSuffix}`, ...gatewayNotification }); + return this.sendGatewayPush(gateway, 'apn', app.token.apn, { topic: app.appName, ...gatewayNotification }); } if ('gcm' in app.token && app.token.gcm) { @@ -318,7 +315,6 @@ class PushClass { contentAvailable: Match.Optional(Match.Integer), apn: Match.Optional({ category: Match.Optional(String), - topicSuffix: Match.Optional(String), }), gcm: Match.Optional({ image: Match.Optional(String), @@ -357,7 +353,7 @@ class PushClass { ...(this.hasApnOptions(options) ? { apn: { - ...pick(options.apn, 'category', 'topicSuffix'), + ...pick(options.apn, 'category'), }, } : {}), diff --git a/apps/meteor/server/services/video-conference/service.ts b/apps/meteor/server/services/video-conference/service.ts index 818280fd4d3..1240e9ec727 100644 --- a/apps/meteor/server/services/video-conference/service.ts +++ b/apps/meteor/server/services/video-conference/service.ts @@ -627,8 +627,7 @@ export class VideoConfService extends ServiceClassInternal implements IVideoConf image: RocketChatAssets.getURL('Assets_favicon_192'), }, apn: { - category: 'MESSAGE_NOREPLY', - topicSuffix: '.voip', + category: 'VIDEOCONF', }, }); }