mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-05-25 11:22:16 +00:00
Telegram webhook (#4227)
This commit is contained in:
parent
6dbd261852
commit
56da256853
13 changed files with 478 additions and 1 deletions
|
@ -263,6 +263,18 @@ func (f *NewDingtalkHookForm) Validate(ctx *macaron.Context, errs binding.Errors
|
|||
return validate(errs, ctx.Data, f, ctx.Locale)
|
||||
}
|
||||
|
||||
// NewTelegramHookForm form for creating telegram hook
|
||||
type NewTelegramHookForm struct {
|
||||
BotToken string `binding:"Required"`
|
||||
ChatID string `binding:"Required"`
|
||||
WebhookForm
|
||||
}
|
||||
|
||||
// Validate validates the fields
|
||||
func (f *NewTelegramHookForm) Validate(ctx *macaron.Context, errs binding.Errors) binding.Errors {
|
||||
return validate(errs, ctx.Data, f, ctx.Locale)
|
||||
}
|
||||
|
||||
// .___
|
||||
// | | ______ ________ __ ____
|
||||
// | |/ ___// ___/ | \_/ __ \
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue