summaryrefslogtreecommitdiff
path: root/packages/backend/src/core/PushNotificationService.ts
diff options
context:
space:
mode:
Diffstat (limited to 'packages/backend/src/core/PushNotificationService.ts')
-rw-r--r--packages/backend/src/core/PushNotificationService.ts5
1 files changed, 5 insertions, 0 deletions
diff --git a/packages/backend/src/core/PushNotificationService.ts b/packages/backend/src/core/PushNotificationService.ts
index 69020f7e84..fd24831fbc 100644
--- a/packages/backend/src/core/PushNotificationService.ts
+++ b/packages/backend/src/core/PushNotificationService.ts
@@ -15,6 +15,7 @@ type PushNotificationsTypes = {
antenna: { id: string, name: string };
note: Packed<'Note'>;
};
+ 'readAllNotifications': undefined;
};
// Reduce length because push message servers have character limits
@@ -68,6 +69,10 @@ export class PushNotificationService {
});
for (const subscription of subscriptions) {
+ if ([
+ 'readAllNotifications',
+ ].includes(type) && !subscription.sendReadMessage) continue;
+
const pushSubscription = {
endpoint: subscription.endpoint,
keys: {