mirror of
https://github.com/wekan/wekan.git
synced 2025-12-16 23:40:13 +01:00
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
This commit is contained in:
parent
a545f8c1a2
commit
2c44f83453
5 changed files with 848 additions and 716 deletions
|
|
@ -6,12 +6,17 @@ Meteor.startup(() => {
|
|||
['card', 'list', 'oldList', 'board', 'comment'].forEach(key => {
|
||||
if (quoteParams[key]) quoteParams[key] = `"${params[key]}"`;
|
||||
});
|
||||
['timeValue', 'timeOldValue'].forEach(key => {
|
||||
if (quoteParams[key]) quoteParams[key] = `${params[key]}`;
|
||||
});
|
||||
|
||||
const lan = user.getLanguage();
|
||||
const subject = TAPi18n.__(title, params, lan); // the original function has a fault, i believe the title should be used according to original author
|
||||
const existing = user.getEmailBuffer().length > 0;
|
||||
const text = `${existing ? `\n${subject}\n` : ''}${
|
||||
params.user
|
||||
} ${TAPi18n.__(description, quoteParams, lan)}\n${params.url}`;
|
||||
|
||||
const text = `${params.user} ${TAPi18n.__(
|
||||
description,
|
||||
quoteParams,
|
||||
user.getLanguage(),
|
||||
)}\n${params.url}`;
|
||||
user.addEmailBuffer(text);
|
||||
|
||||
// unlike setTimeout(func, delay, args),
|
||||
|
|
@ -29,12 +34,11 @@ Meteor.startup(() => {
|
|||
// merge the cached content into single email and flush
|
||||
const text = texts.join('\n\n');
|
||||
user.clearEmailBuffer();
|
||||
|
||||
try {
|
||||
Email.send({
|
||||
to: user.emails[0].address.toLowerCase(),
|
||||
from: Accounts.emailTemplates.from,
|
||||
subject: TAPi18n.__('act-activity-notify', {}, user.getLanguage()),
|
||||
subject,
|
||||
text,
|
||||
});
|
||||
} catch (e) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue