diff --git a/src/notification/notification.service.ts b/src/notification/notification.service.ts index 82377b6..7359237 100644 --- a/src/notification/notification.service.ts +++ b/src/notification/notification.service.ts @@ -122,7 +122,14 @@ export async function listNotifications( filterObj.forEach((item) => { if (item.changes) { - item[`changes.${item.changes.$eq}`] = { $exists: true }; + if (item.changes.$eq) { + item[`changes.${item.changes.$eq}`] = { $exists: true }; + } else if (item.changes.$in) { + item.changes.$in.forEach((value) => { + item[`changes.${value}`] = { $exists: true }; + }); + } + delete item["changes"]; } });