fix(claiming): better sync and notif handling

This commit is contained in:
Sabe Jones
2019-04-15 12:31:19 -05:00
parent 76ae41875d
commit 4c832ad36c
2 changed files with 2 additions and 1 deletions

View File

@@ -331,6 +331,7 @@ api.approveTask = {
// Remove old notifications
let approvalPromises = [];
managers.forEach((manager) => {
if (manager._id === task.group.approval.approvingUser) return;
let notificationIndex = manager.notifications.findIndex(function findNotification (notification) {
return notification && notification.data && notification.data.taskId === task._id && notification.type === 'GROUP_TASK_APPROVAL';
});