Telegram Webhookによるボット操作機能を追加(課題の追加・完了・一覧・スヌーズ対応)
This commit is contained in:
@@ -221,6 +221,12 @@ func Setup(cfg *config.Config) *gin.Engine {
|
||||
apiHandler := handler.NewAPIHandler()
|
||||
apiRecurringHandler := handler.NewAPIRecurringHandler()
|
||||
|
||||
if cfg.Notification.TelegramBotToken != "" && cfg.Notification.TelegramWebhookSecret != "" {
|
||||
telegramService := service.NewTelegramService(notificationService, service.NewAssignmentService())
|
||||
telegramHandler := handler.NewTelegramHandler(telegramService, cfg.Notification.TelegramWebhookSecret)
|
||||
r.POST("/api/telegram/webhook", telegramHandler.Webhook)
|
||||
}
|
||||
|
||||
r.GET("/captcha/:file", gin.WrapH(captcha.Server(captcha.StdWidth, captcha.StdHeight)))
|
||||
r.GET("/captcha-new", func(c *gin.Context) {
|
||||
id := captcha.New()
|
||||
|
||||
Reference in New Issue
Block a user