mirror of
https://github.com/wekan/wekan.git
synced 2026-02-06 08:31:48 +01:00
improve notifications
This commit is contained in:
parent
28a01862d0
commit
b925b8e74d
9 changed files with 163 additions and 59 deletions
|
|
@ -333,3 +333,12 @@ Migrations.add('add-authenticationMethod', () => {
|
|||
},
|
||||
}, noValidateMulti);
|
||||
});
|
||||
|
||||
Migrations.add('remove-tag', () => {
|
||||
Users.update({
|
||||
}, {
|
||||
$unset: {
|
||||
'profile.tags':1,
|
||||
},
|
||||
}, noValidateMulti);
|
||||
});
|
||||
|
|
@ -2,6 +2,7 @@
|
|||
Meteor.startup(() => {
|
||||
Notifications.subscribe('email', (user, title, description, params) => {
|
||||
// add quote to make titles easier to read in email text
|
||||
console.log('ICI', user, title, description, params);
|
||||
const quoteParams = _.clone(params);
|
||||
['card', 'list', 'oldList', 'board', 'comment'].forEach((key) => {
|
||||
if (quoteParams[key]) quoteParams[key] = `"${params[key]}"`;
|
||||
|
|
|
|||
|
|
@ -25,16 +25,12 @@ Notifications = {
|
|||
participants.forEach((userId) => {
|
||||
if (userMap[userId]) return;
|
||||
const user = Users.findOne(userId);
|
||||
if (user && user.hasTag('notify-participate')) {
|
||||
userMap[userId] = user;
|
||||
}
|
||||
userMap[userId] = user;
|
||||
});
|
||||
watchers.forEach((userId) => {
|
||||
if (userMap[userId]) return;
|
||||
const user = Users.findOne(userId);
|
||||
if (user && user.hasTag('notify-watch')) {
|
||||
userMap[userId] = user;
|
||||
}
|
||||
userMap[userId] = user;
|
||||
});
|
||||
return _.map(userMap, (v) => v);
|
||||
},
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue