diff options
| author | Shulhan <ms@kilabit.info> | 2024-04-17 00:41:56 +0700 |
|---|---|---|
| committer | Shulhan <ms@kilabit.info> | 2024-04-17 00:41:56 +0700 |
| commit | d07c7fa5d474e95a3bcae01bdb385cb5727fb970 (patch) | |
| tree | 63893b5ecb032eaf9370ad7c8997c3d255f022c4 | |
| parent | c4546dce4e83a3cf84ec879117825293aa0686ff (diff) | |
| download | pakakeh.go-d07c7fa5d474e95a3bcae01bdb385cb5727fb970.tar.xz | |
telegram/bot: fix Webhook URL registration
Using [path.Join] cause "https://domain" become "https:/domain" which
is not a valid URL.
| -rw-r--r-- | api/telegram/bot/bot.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/api/telegram/bot/bot.go b/api/telegram/bot/bot.go index 277ec3c2..38078878 100644 --- a/api/telegram/bot/bot.go +++ b/api/telegram/bot/bot.go @@ -340,7 +340,7 @@ func (bot *Bot) setWebhook() (err error) { var ( logp = `setWebhook` params = make(map[string][]byte) - webhookURL = path.Join(bot.opts.Webhook.URL, bot.opts.Token) + webhookURL = bot.opts.Webhook.URL + path.Join(`/`, bot.opts.Token) ) params[paramNameURL] = []byte(webhookURL) |
