- Fix: Update broke the ability to mute notifications;

- Automatically close the sidebar.

Thanks to Akuket !

Closes #1952
This commit is contained in:
Lauri Ojansivu 2018-10-16 13:52:45 +03:00
parent f5125b76bc
commit 849f15ceee
3 changed files with 8 additions and 14 deletions

View file

@ -20,19 +20,13 @@ Notifications = {
},
// 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) => {