feat(webhook): queue incoming messages
This commit is contained in:
@@ -13,6 +13,7 @@ import (
|
||||
telegramchannel "github.com/gochat/gochat/internal/channel/telegram"
|
||||
"github.com/gochat/gochat/internal/model"
|
||||
channelmodel "github.com/gochat/gochat/internal/model/channel"
|
||||
"github.com/gochat/gochat/internal/worker"
|
||||
applogger "github.com/gochat/gochat/pkg/logger"
|
||||
"gorm.io/gorm"
|
||||
)
|
||||
@@ -55,6 +56,13 @@ func NewTelegramWebhookHandler(
|
||||
}
|
||||
}
|
||||
|
||||
func (h *TelegramWebhookHandler) WithWorkerPool(wp *worker.WorkerPool) *TelegramWebhookHandler {
|
||||
if h != nil && h.persister != nil {
|
||||
h.persister.SetWorkerPool(wp)
|
||||
}
|
||||
return h
|
||||
}
|
||||
|
||||
// HandleTelegramWebhook processes an incoming Telegram webhook Gin request.
|
||||
// URL pattern: /webhooks/telegram/:bot_token
|
||||
// Method: POST
|
||||
|
||||
Reference in New Issue
Block a user