mirror of
https://github.com/go-vikunja/vikunja.git
synced 2026-04-29 19:10:51 -05:00
fix(webhook): make sure the payload always contains a fully loaded project
This commit is contained in:
@@ -1019,7 +1019,10 @@ func (wl *WebhookListener) Handle(msg *message.Message) (err error) {
|
||||
for _, webhook := range matchingWebhooks {
|
||||
|
||||
if _, has := event["project"]; !has {
|
||||
project := &Project{ID: webhook.ProjectID}
|
||||
project, err := GetProjectSimpleByID(s, webhook.CreatedByID)
|
||||
if err != nil && !IsErrProjectDoesNotExist(err) {
|
||||
log.Errorf("Could not load project for webhook %d: %s", webhook.ID, err)
|
||||
}
|
||||
err = project.ReadOne(s, &user.User{ID: doerID})
|
||||
if err != nil && !IsErrProjectDoesNotExist(err) {
|
||||
log.Errorf("Could not load project for webhook %d: %s", webhook.ID, err)
|
||||
|
||||
Reference in New Issue
Block a user