mirror of
https://github.com/sudoxnym/habitica.git
synced 2026-05-19 04:08:54 +00:00
fix(teams): send @username in notifications
This commit is contained in:
parent
89c07529ea
commit
631d7111a5
3 changed files with 5 additions and 5 deletions
|
|
@ -201,7 +201,7 @@
|
|||
"yourTaskHasBeenApproved": "Your task <span class=\"notification-green notification-bold\"><%- taskText %></span> has been approved.",
|
||||
"thisTaskApproved": "This task was approved",
|
||||
"taskClaimed": "<%- userName %> has claimed the task <span class=\"notification-bold\"><%- taskText %></span>.",
|
||||
"taskNeedsWork": "<span class=\"notification-bold\"><%- taskText %></span> was unchecked by <span class=\"notification-bold\"><%- managerName %></span>. Your rewards for completing the task were reverted.",
|
||||
"taskNeedsWork": "<span class=\"notification-bold\"><%- taskText %></span> was unchecked by <span class=\"notification-bold\">@<%- managerName %></span>. Your rewards for completing the task were reverted.",
|
||||
"userHasRequestedTaskApproval": "<span class=\"notification-bold\"><%- user %></span> requests approval for <span class=\"notification-bold\"><%- taskName %></span>",
|
||||
"approve": "Approve",
|
||||
"approveTask": "Approve Task",
|
||||
|
|
|
|||
|
|
@ -371,7 +371,7 @@ api.taskNeedsWork = {
|
|||
|
||||
await scoreTasks(assignedUser, [{ id: task._id, direction: 'down' }], req, res);
|
||||
assignedUser.addNotification('GROUP_TASK_NEEDS_WORK', {
|
||||
message: res.t('taskNeedsWork', { taskText: task.text, managerName: user.profile.name }, assignedUser.preferences.language),
|
||||
message: res.t('taskNeedsWork', { taskText: task.text, managerName: user.auth.local.username }, assignedUser.preferences.language),
|
||||
task: {
|
||||
id: task._id,
|
||||
text: task.text,
|
||||
|
|
@ -382,7 +382,7 @@ api.taskNeedsWork = {
|
|||
},
|
||||
manager: {
|
||||
id: user._id,
|
||||
name: user.profile.name,
|
||||
name: user.auth.local.username,
|
||||
},
|
||||
});
|
||||
await Promise.all([assignedUser.save(), task.save()]);
|
||||
|
|
|
|||
|
|
@ -452,7 +452,7 @@ async function scoreTask (user, task, direction, req, res) {
|
|||
direction,
|
||||
}, req, res.analytics);
|
||||
rollbackUser.addNotification('GROUP_TASK_NEEDS_WORK', {
|
||||
message: res.t('taskNeedsWork', { taskText: task.text, managerName: user.profile.name }, rollbackUser.preferences.language),
|
||||
message: res.t('taskNeedsWork', { taskText: task.text, managerName: user.auth.local.username }, rollbackUser.preferences.language),
|
||||
task: {
|
||||
id: task._id,
|
||||
text: task.text,
|
||||
|
|
@ -463,7 +463,7 @@ async function scoreTask (user, task, direction, req, res) {
|
|||
},
|
||||
manager: {
|
||||
id: user._id,
|
||||
name: user.profile.name,
|
||||
name: user.auth.local.username,
|
||||
},
|
||||
});
|
||||
await rollbackUser.save();
|
||||
|
|
|
|||
Loading…
Reference in a new issue