summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorShulhan <ms@kilabit.info>2024-04-17 00:41:56 +0700
committerShulhan <ms@kilabit.info>2024-04-17 00:41:56 +0700
commitd07c7fa5d474e95a3bcae01bdb385cb5727fb970 (patch)
tree63893b5ecb032eaf9370ad7c8997c3d255f022c4
parentc4546dce4e83a3cf84ec879117825293aa0686ff (diff)
downloadpakakeh.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.go2
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)