From 7101e761fa9a68067c88b47ba7f491237cd08004 Mon Sep 17 00:00:00 2001 From: tamaina Date: Sun, 5 Sep 2021 16:58:00 +0900 Subject: [PATCH] push readAllNotifications as notification when api mark-all-as-read called --- src/server/api/endpoints/notifications/mark-all-as-read.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/server/api/endpoints/notifications/mark-all-as-read.ts b/src/server/api/endpoints/notifications/mark-all-as-read.ts index 8d4e512750..2e9b56bfad 100644 --- a/src/server/api/endpoints/notifications/mark-all-as-read.ts +++ b/src/server/api/endpoints/notifications/mark-all-as-read.ts @@ -1,4 +1,5 @@ import { publishMainStream } from '@/services/stream'; +import { pushNotification } from '@/services/push-notification'; import define from '../../define'; import { Notifications } from '@/models/index'; @@ -21,4 +22,5 @@ export default define(meta, async (ps, user) => { // 全ての通知を読みましたよというイベントを発行 publishMainStream(user.id, 'readAllNotifications'); + pushNotification(user.id, 'readAllNotifications', undefined); });