1
1
mirror of https://github.com/go-gitea/gitea synced 2025-07-16 07:18:37 +00:00

Fix bug for webhook and feishu caused by API changed (#13937)

* Fix bug for webhook

* Fix bug for feishu
This commit is contained in:
Lunny Xiao
2020-12-12 00:04:04 +08:00
committed by GitHub
parent b35546631e
commit ea914d0f7a
3 changed files with 37 additions and 57 deletions

View File

@@ -144,7 +144,7 @@ func prepareWebhook(w *models.Webhook, repo *models.Repository, event models.Hoo
var payloader api.Payloader
var err error
webhook, ok := webhooks[w.Type]
webhook, ok := webhooks[strings.TrimSpace(w.Type)] // NOTICE: w.Type maynot be trimmed before store into database
if ok {
payloader, err = webhook.payloadCreator(p, event, w.Meta)
if err != nil {