gitea/services/webhook
zeripath d6fa138e7c
Only send webhook events to active system webhooks and only deliver to active hooks (#19234)
There is a bug in the system webhooks whereby the active state is not checked when
webhooks are prepared and there is a bug that deactivating webhooks do not prevent
queued deliveries.

* Only add SystemWebhooks to the prepareWebhooks list if they are active
* At the time of delivery if the underlying webhook is not active mark it
as "delivered" but with a failed delivery so it does not get delivered.

Fix #19220

Signed-off-by: Andrew Thornton <art27@cantab.net>

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
2022-03-28 11:17:21 +08:00
..
deliver.go Only send webhook events to active system webhooks and only deliver to active hooks (#19234) 2022-03-28 11:17:21 +08:00
deliver_test.go format with gofumpt (#18184) 2022-01-20 18:46:10 +01:00
dingtalk.go format with gofumpt (#18184) 2022-01-20 18:46:10 +01:00
dingtalk_test.go
discord.go format with gofumpt (#18184) 2022-01-20 18:46:10 +01:00
discord_test.go
feishu.go format with gofumpt (#18184) 2022-01-20 18:46:10 +01:00
feishu_test.go
general.go Simplify parameter types (#18006) 2021-12-20 04:41:31 +00:00
general_test.go
main_test.go Add missing `X-Total-Count` and fix some related bugs (#17968) 2021-12-15 13:39:34 +08:00
matrix.go format with gofumpt (#18184) 2022-01-20 18:46:10 +01:00
matrix_test.go
msteams.go format with gofumpt (#18184) 2022-01-20 18:46:10 +01:00
msteams_test.go
packagist.go Add packagist webhook (#18224) 2022-01-23 21:46:30 +08:00
packagist_test.go Add packagist webhook (#18224) 2022-01-23 21:46:30 +08:00
payloader.go
slack.go format with gofumpt (#18184) 2022-01-20 18:46:10 +01:00
slack_test.go
telegram.go format with gofumpt (#18184) 2022-01-20 18:46:10 +01:00
telegram_test.go
webhook.go Only send webhook events to active system webhooks and only deliver to active hooks (#19234) 2022-03-28 11:17:21 +08:00
webhook_test.go Move repository model into models/repo (#17933) 2021-12-10 09:27:50 +08:00
wechatwork.go format with gofumpt (#18184) 2022-01-20 18:46:10 +01:00