Skip to content

Commit 90a9a80

Browse files
committed
fix: mobile push notification count inc
1 parent 8020a03 commit 90a9a80

2 files changed

Lines changed: 5 additions & 3 deletions

File tree

apps/meteor/app/push-notifications/server/lib/PushNotification.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,9 +103,10 @@ class PushNotification {
103103
idOnly,
104104
});
105105

106+
await Push.send(config);
107+
106108
metrics.notificationsSent.inc({ notification_type: 'mobile' });
107109
metrics.notificationsSentTotal.inc({ notification_type: 'mobile' });
108-
await Push.send(config);
109110
}
110111

111112
async getNotificationForMessageId({

apps/meteor/server/services/video-conference/service.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -674,8 +674,6 @@ export class VideoConfService extends ServiceClassInternal implements IVideoConf
674674
return;
675675
}
676676

677-
metrics.notificationsSent.inc({ notification_type: 'mobile' });
678-
metrics.notificationsSentTotal.inc({ notification_type: 'mobile' });
679677
await Push.send({
680678
from: 'push',
681679
badge: 0,
@@ -702,6 +700,9 @@ export class VideoConfService extends ServiceClassInternal implements IVideoConf
702700
category: 'VIDEOCONF',
703701
},
704702
});
703+
704+
metrics.notificationsSent.inc({ notification_type: 'mobile' });
705+
metrics.notificationsSentTotal.inc({ notification_type: 'mobile' });
705706
}
706707

707708
private async sendAllPushNotifications(callId: VideoConference['_id']): Promise<void> {

0 commit comments

Comments
 (0)