summaryrefslogtreecommitdiffstats
path: root/models/activities.js
diff options
context:
space:
mode:
authorSam X. Chen <sam.xi.chen@gmail.com>2019-07-09 16:36:50 -0400
committerSam X. Chen <sam.xi.chen@gmail.com>2019-07-09 16:36:50 -0400
commit2c44f834530d09cfc6645acb8dd84ffd9e4eeb6b (patch)
treebf979ad0958f8135a14f155515f6b59cc178298e /models/activities.js
parenta545f8c1a2278f3f143c41abc32c394e75a4cd19 (diff)
downloadwekan-2c44f834530d09cfc6645acb8dd84ffd9e4eeb6b.tar.gz
wekan-2c44f834530d09cfc6645acb8dd84ffd9e4eeb6b.tar.bz2
wekan-2c44f834530d09cfc6645acb8dd84ffd9e4eeb6b.zip
Add Feature: system timelines will be showing any modification for duat startat endat receivedat, also notification to the watchers and if card is due, watchers will be notified
Diffstat (limited to 'models/activities.js')
-rw-r--r--models/activities.js13
1 files changed, 12 insertions, 1 deletions
diff --git a/models/activities.js b/models/activities.js
index e76f3ad1..3ad316a7 100644
--- a/models/activities.js
+++ b/models/activities.js
@@ -197,6 +197,18 @@ if (Meteor.isServer) {
// params.label = label.name;
// params.labelId = activity.labelId;
//}
+ if (
+ (!activity.timeKey || activity.timeKey === 'dueAt') &&
+ activity.timeValue
+ ) {
+ // due time reminder
+ title = 'act-withDue';
+ }
+ ['timeValue', 'timeOldValue'].forEach(key => {
+ // copy time related keys & values to params
+ const value = activity[key];
+ if (value) params[key] = value;
+ });
if (board) {
const watchingUsers = _.pluck(
_.where(board.watchers, { level: 'watching' }),
@@ -212,7 +224,6 @@ if (Meteor.isServer) {
_.intersection(participants, trackingUsers),
);
}
-
Notifications.getUsers(watchers).forEach(user => {
Notifications.notify(user, title, description, params);
});