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 authored and GitHub committed 2020-12-11 17:04:04 +01:00
1 parent b35546631e
commit ea914d0f7a
3 files changed
+37 -57

No files matched your search

+1 -1
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 {