diff options
author | guillaume <guillaume.cassou@supinfo.com> | 2018-10-16 11:33:16 +0200 |
---|---|---|
committer | guillaume <guillaume.cassou@supinfo.com> | 2018-10-16 11:33:16 +0200 |
commit | 41330b15dccfdd45c08b2657833a0bcba9576243 (patch) | |
tree | e1e9548eeb6a4c2c6fc80ff94e556489ad9493c4 /server/notifications | |
parent | 5c588b24240fb2fc996828e8478ac24a490971d8 (diff) | |
download | wekan-41330b15dccfdd45c08b2657833a0bcba9576243.tar.gz wekan-41330b15dccfdd45c08b2657833a0bcba9576243.tar.bz2 wekan-41330b15dccfdd45c08b2657833a0bcba9576243.zip |
update broke ability to mute notifications
Diffstat (limited to 'server/notifications')
-rw-r--r-- | server/notifications/notifications.js | 15 |
1 files changed, 4 insertions, 11 deletions
diff --git a/server/notifications/notifications.js b/server/notifications/notifications.js index 72692ef8..fa8b2ee2 100644 --- a/server/notifications/notifications.js +++ b/server/notifications/notifications.js @@ -19,20 +19,13 @@ Notifications = { delete notifyServices[serviceName]; }, - // filter recipients according to user settings for notification - getUsers: (participants, watchers) => { - const userMap = {}; - participants.forEach((userId) => { - if (userMap[userId]) return; - const user = Users.findOne(userId); - userMap[userId] = user; - }); + getUsers: (watchers) => { + const users = []; watchers.forEach((userId) => { - if (userMap[userId]) return; const user = Users.findOne(userId); - userMap[userId] = user; + if (user) users.push(user); }); - return _.map(userMap, (v) => v); + return users; }, notify: (user, title, description, params) => { |