From 50fc22eecfd9d96f4b15d75e1b9f85d83715db87 Mon Sep 17 00:00:00 2001 From: Earl Warren <109468362+earl-warren@users.noreply.github.com> Date: Sun, 13 Aug 2023 16:00:06 +0200 Subject: Add ThreadID parameter for Telegram webhooks (#25996) Telegram has recently implemented threads (channels) for group chats. Co-authored-by: neveraskedtoexist --- services/forms/repo_form.go | 1 + services/webhook/telegram.go | 1 + 2 files changed, 2 insertions(+) (limited to 'services') 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"` } ) -- cgit v1.2.3