push readAllNotifications as notification when api mark-all-as-read called

This commit is contained in:
tamaina 2021-09-05 16:58:00 +09:00
parent 32d6a0a0d2
commit 7101e761fa

View file

@ -1,4 +1,5 @@
import { publishMainStream } from '@/services/stream'; import { publishMainStream } from '@/services/stream';
import { pushNotification } from '@/services/push-notification';
import define from '../../define'; import define from '../../define';
import { Notifications } from '@/models/index'; import { Notifications } from '@/models/index';
@ -21,4 +22,5 @@ export default define(meta, async (ps, user) => {
// 全ての通知を読みましたよというイベントを発行 // 全ての通知を読みましたよというイベントを発行
publishMainStream(user.id, 'readAllNotifications'); publishMainStream(user.id, 'readAllNotifications');
pushNotification(user.id, 'readAllNotifications', undefined);
}); });