summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--client/components/sidebar/sidebar.js3
-rw-r--r--models/activities.js4
-rw-r--r--server/migrations.js8
-rw-r--r--server/notifications/notifications.js15
4 files changed, 15 insertions, 15 deletions
diff --git a/client/components/sidebar/sidebar.js b/client/components/sidebar/sidebar.js
index 5d34c4a8..83b12666 100644
--- a/client/components/sidebar/sidebar.js
+++ b/client/components/sidebar/sidebar.js
@@ -16,8 +16,7 @@ BlazeComponent.extendComponent({
},
onCreated() {
- const initOpen = Utils.isMiniScreen() ? false : (!Session.get('currentCard'));
- this._isOpen = new ReactiveVar(initOpen);
+ this._isOpen = new ReactiveVar(false);
this._view = new ReactiveVar(defaultView);
Sidebar = this;
},
diff --git a/models/activities.js b/models/activities.js
index aad5d412..47e3ff1e 100644
--- a/models/activities.js
+++ b/models/activities.js
@@ -152,10 +152,10 @@ if (Meteor.isServer) {
if (board) {
const watchingUsers = _.pluck(_.where(board.watchers, {level: 'watching'}), 'userId');
const trackingUsers = _.pluck(_.where(board.watchers, {level: 'tracking'}), 'userId');
- watchers = _.union(watchers, watchingUsers || []);
+ watchers = _.union(watchers, watchingUsers, _.intersection(participants, trackingUsers));
}
- Notifications.getUsers(participants, watchers).forEach((user) => {
+ Notifications.getUsers(watchers).forEach((user) => {
Notifications.notify(user, title, description, params);
});
diff --git a/server/migrations.js b/server/migrations.js
index a5d93a4c..36355bdc 100644
--- a/server/migrations.js
+++ b/server/migrations.js
@@ -341,4 +341,12 @@ Migrations.add('remove-tag', () => {
'profile.tags':1,
},
}, noValidateMulti);
+});
+
+Migrations.add('remove-customFields-references-broken', () => {
+ Cards.update(
+ {'customFields.$value': null},
+ {$pull: {customFields: {value: null}}},
+ noValidateMulti,
+ );
}); \ No newline at end of file
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) => {