1
0

fix(webhooks): make sure all events with tasks have the full task

Resolves https://kolaente.dev/vikunja/api/issues/1676
This commit is contained in:
kolaente
2024-01-27 00:16:17 +01:00
parent d38050f2b8
commit ae9b382963
5 changed files with 50 additions and 23 deletions

View File

@ -114,8 +114,13 @@ func (tc *TaskComment) Delete(s *xorm.Session, _ web.Auth) error {
return err
}
task, err := GetTaskByIDSimple(s, tc.TaskID)
if err != nil {
return err
}
return events.Dispatch(&TaskCommentDeletedEvent{
Task: &Task{ID: tc.TaskID},
Task: &task,
Comment: tc,
Doer: tc.Author,
})