From 828a27feeb11474b848be183a8fce2d036dec3cc Mon Sep 17 00:00:00 2001 From: S7evinK Date: Sat, 28 Mar 2020 14:09:55 +0100 Subject: Add Matrix webhook (#10831) * Add Matrix webhook Signed-off-by: Till Faelligen * Add template and related translations for Matrix hook Signed-off-by: Till Faelligen * Add actual webhook routes and form Signed-off-by: Till Faelligen * Add missing file Signed-off-by: Till Faelligen * Update modules/webhook/matrix_test.go * Use stricter regex to replace URLs Signed-off-by: Till Faelligen * Escape url and text Signed-off-by: Till Faelligen * Remove unnecessary whitespace * Fix copy and paste mistake Co-Authored-By: Tulir Asokan * Fix indention inconsistency * Use Authorization header instead of url parameter * Add raw commit information to webhook Co-authored-by: Lauris BH Co-authored-by: Tulir Asokan --- modules/setting/webhook.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'modules/setting') diff --git a/modules/setting/webhook.go b/modules/setting/webhook.go index 3e6040a605..4a0c593c8d 100644 --- a/modules/setting/webhook.go +++ b/modules/setting/webhook.go @@ -36,7 +36,7 @@ func newWebhookService() { Webhook.QueueLength = sec.Key("QUEUE_LENGTH").MustInt(1000) Webhook.DeliverTimeout = sec.Key("DELIVER_TIMEOUT").MustInt(5) Webhook.SkipTLSVerify = sec.Key("SKIP_TLS_VERIFY").MustBool() - Webhook.Types = []string{"gitea", "gogs", "slack", "discord", "dingtalk", "telegram", "msteams", "feishu"} + Webhook.Types = []string{"gitea", "gogs", "slack", "discord", "dingtalk", "telegram", "msteams", "feishu", "matrix"} Webhook.PagingNum = sec.Key("PAGING_NUM").MustInt(10) Webhook.ProxyURL = sec.Key("PROXY_URL").MustString("") if Webhook.ProxyURL != "" { -- cgit v1.2.3