fix(assignees): make sure task assignee created event contains the full task

This commit is contained in:
kolaente 2024-01-28 13:23:27 +01:00
parent e4fec01d52
commit d9875e476c
No known key found for this signature in database
GPG Key ID: F40E70337AB24C9B
1 changed files with 5 additions and 1 deletions

View File

@ -268,8 +268,12 @@ func (t *Task) addNewAssigneeByID(s *xorm.Session, newAssigneeID int64, project
}
doer, _ := user.GetFromAuth(auth)
task, err := GetTaskSimple(s, &Task{ID: t.ID})
if err != nil {
return err
}
err = events.Dispatch(&TaskAssigneeCreatedEvent{
Task: t,
Task: &task,
Assignee: newAssignee,
Doer: doer,
})