aboutsummaryrefslogtreecommitdiffstats
path: root/services
diff options
context:
space:
mode:
authorEarl Warren <109468362+earl-warren@users.noreply.github.com>2023-08-13 16:00:06 +0200
committerGitHub <noreply@github.com>2023-08-13 14:00:06 +0000
commit50fc22eecfd9d96f4b15d75e1b9f85d83715db87 (patch)
tree495df08dbd397932298d11ca317115d9041c9e2f /services
parent82ea557dd37312af02b991069e2debb71721882b (diff)
downloadgitea-50fc22eecfd9d96f4b15d75e1b9f85d83715db87.tar.gz
gitea-50fc22eecfd9d96f4b15d75e1b9f85d83715db87.zip
Add ThreadID parameter for Telegram webhooks (#25996)
Telegram has recently implemented threads (channels) for group chats. Co-authored-by: neveraskedtoexist <matikot415@gmail.com>
Diffstat (limited to 'services')
-rw-r--r--services/forms/repo_form.go1
-rw-r--r--services/webhook/telegram.go1
2 files changed, 2 insertions, 0 deletions
diff --git a/services/forms/repo_form.go b/services/forms/repo_form.go
index a26a2d89c5..8c763e17cb 100644
--- a/services/forms/repo_form.go
+++ b/services/forms/repo_form.go
@@ -353,6 +353,7 @@ func (f *NewDingtalkHookForm) Validate(req *http.Request, errs binding.Errors) b
type NewTelegramHookForm struct {
BotToken string `binding:"Required"`
ChatID string `binding:"Required"`
+ ThreadID string
WebhookForm
}
diff --git a/services/webhook/telegram.go b/services/webhook/telegram.go
index 2d0484648b..ea7e8185de 100644
--- a/services/webhook/telegram.go
+++ b/services/webhook/telegram.go
@@ -28,6 +28,7 @@ type (
TelegramMeta struct {
BotToken string `json:"bot_token"`
ChatID string `json:"chat_id"`
+ ThreadID string `json:"thread_id"`
}
)