Telegram webhook (#4227)

This commit is contained in:
techknowlogick 2019-04-18 22:45:02 -04:00 committed by GitHub
parent 6dbd261852
commit 56da256853
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
13 changed files with 478 additions and 1 deletions

View file

@ -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)
}
// .___
// | | ______ ________ __ ____
// | |/ ___// ___/ | \_/ __ \