From fde58e56ae1e2629ee6b4a77a7feb0ddf38340ee Mon Sep 17 00:00:00 2001 From: Syfaro Date: Tue, 7 Dec 2021 21:30:04 -0500 Subject: [PATCH] Fix ListenForWebhook closing chan after request. --- bot.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/bot.go b/bot.go index 7a27619..c58afec 100644 --- a/bot.go +++ b/bot.go @@ -484,13 +484,12 @@ func (bot *BotAPI) ListenForWebhook(pattern string) UpdatesChannel { } ch <- *update - close(ch) }) return ch } -// ListenForWebhookRespReqFormat registers a http handler for a webhook. +// ListenForWebhookRespReqFormat registers a http handler for a single incoming webhook. func (bot *BotAPI) ListenForWebhookRespReqFormat(w http.ResponseWriter, r *http.Request) UpdatesChannel { ch := make(chan Update, bot.Buffer)