fix duplicated notification
This commit is contained in:
@@ -43,7 +43,7 @@ const notifier = {
|
|||||||
// insert notifications
|
// insert notifications
|
||||||
const notifications = await eventController.getNotifications(event, action)
|
const notifications = await eventController.getNotifications(event, action)
|
||||||
await event.addNotifications(notifications)
|
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 => {
|
const promises = event_notifications.map(async notification => {
|
||||||
try {
|
try {
|
||||||
|
|||||||
Reference in New Issue
Block a user