summaryrefslogtreecommitdiffstats
path: root/services/webhook/webhook.go
diff options
context:
space:
mode:
authorLunny Xiao <xiaolunwen@gmail.com>2020-12-12 00:04:04 +0800
committerGitHub <noreply@github.com>2020-12-11 17:04:04 +0100
commitea914d0f7a65a95229fb769ae7d7d5d98bf72263 (patch)
tree86a23ab3f373571360af4a1a0548e02e83e15a7a /services/webhook/webhook.go
parentb35546631e1efecbdae905d3925c5d76f9b96ded (diff)
downloadgitea-ea914d0f7a65a95229fb769ae7d7d5d98bf72263.tar.gz
gitea-ea914d0f7a65a95229fb769ae7d7d5d98bf72263.zip
Fix bug for webhook and feishu caused by API changed (#13937)
* Fix bug for webhook * Fix bug for feishu
Diffstat (limited to 'services/webhook/webhook.go')
-rw-r--r--services/webhook/webhook.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/services/webhook/webhook.go b/services/webhook/webhook.go
index 88dec6bd40..a86d638ab5 100644
--- a/services/webhook/webhook.go
+++ b/services/webhook/webhook.go
@@ -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 {