Implemented requested changes

This commit is contained in:
Mateus Etto
2018-05-18 23:08:37 +09:00
parent 2588befceb
commit 97e80e2093
7 changed files with 284 additions and 154 deletions

View File

@@ -209,10 +209,13 @@ api.assignTask = {
// User is claiming the task
if (user._id === assignedUserId) {
let message = res.t('userIsClamingTask', {username: user.profile.name, task: task.text});
const newMessage = group.sendChat(message, null, null, {
type: 'claim_task',
user: user.profile.name,
task: task.text,
const newMessage = group.sendChat({
message,
info: {
type: 'claim_task',
user: user.profile.name,
task: task.text,
},
});
promises.push(newMessage.save());
}