Skip to content

Commit af5bc41

Browse files
committed
get new notification types by default
1 parent 3a18072 commit af5bc41

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/services/NotificationService.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -185,11 +185,11 @@ function* listNotifications(query, userId) {
185185
if (_.keys(notificationSettings).length > 0) {
186186
// only filter out notifications types which were explicitly set to 'no' - so we return notification by default
187187
const notifications = _.keys(notificationSettings).filter((notificationType) =>
188-
!notificationSettings[notificationType] ||
189-
!notificationSettings[notificationType].web ||
190-
notificationSettings[notificationType].web.enabled !== 'no'
188+
!notificationSettings[notificationType] &&
189+
!notificationSettings[notificationType].web &&
190+
notificationSettings[notificationType].web.enabled === 'no'
191191
);
192-
filter.where.type = { $in: notifications };
192+
filter.where.type = { $notIn: notifications };
193193
}
194194
if (query.type) {
195195
filter.where.type = query.type;

0 commit comments

Comments
 (0)