check telegram webhook tls handshake
This commit is contained in:
parent
2022d04b94
commit
9b7184fa79
2 changed files with 28 additions and 4 deletions
|
@ -91,7 +91,13 @@ func main() {
|
|||
if err != nil {
|
||||
log.Fatal(err)
|
||||
}
|
||||
|
||||
info, err := bot.GetWebhookInfo()
|
||||
if err != nil {
|
||||
log.Fatal(err)
|
||||
}
|
||||
if info.LastErrorDate != 0 {
|
||||
log.Printf("[Telegram callback failed]%s", info.LastErrorMessage)
|
||||
}
|
||||
updates := bot.ListenForWebhook("/" + bot.Token)
|
||||
go http.ListenAndServeTLS("0.0.0.0:8443", "cert.pem", "key.pem", nil)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue