From aedf7b522d1c493344004d8523a4d2646c2971d1 Mon Sep 17 00:00:00 2001 From: les Date: Mon, 19 Jul 2021 12:05:56 +0200 Subject: [PATCH] fix duplicated notification --- server/notifier.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/notifier.js b/server/notifier.js index 6405a797..5a8b55b4 100644 --- a/server/notifier.js +++ b/server/notifier.js @@ -43,7 +43,7 @@ const notifier = { // insert notifications const notifications = await eventController.getNotifications(event, action) await event.addNotifications(notifications) - const event_notifications = await event.getNotifications() + const event_notifications = await event.getNotifications({ through: { where: { status: 'new' } } }) const promises = event_notifications.map(async notification => { try {