1
0

Task mentions (#926)

Co-authored-by: kolaente <k@knt.li>
Reviewed-on: https://kolaente.dev/vikunja/api/pulls/926
Co-authored-by: konrad <konrad@kola-entertainments.de>
Co-committed-by: konrad <konrad@kola-entertainments.de>
This commit is contained in:
konrad
2021-07-29 15:42:49 +00:00
parent e600f61e06
commit 1571dfa825
18 changed files with 619 additions and 15 deletions

View File

@ -132,7 +132,21 @@ func (tc *TaskComment) Update(s *xorm.Session, a web.Auth) error {
if updated == 0 {
return ErrTaskCommentDoesNotExist{ID: tc.ID}
}
return err
if err != nil {
return err
}
task, err := GetTaskSimple(s, &Task{ID: tc.TaskID})
if err != nil {
return err
}
return events.Dispatch(&TaskCommentUpdatedEvent{
Task: &task,
Comment: tc,
Doer: tc.Author,
})
}
// ReadOne handles getting a single comment