Skip bad CA
This commit is contained in:
parent
c155adcbe0
commit
514574ef03
2 changed files with 6 additions and 2 deletions
4
main.go
4
main.go
|
@ -62,7 +62,7 @@ type CardFaceFlipPics struct {
|
|||
|
||||
func webhook(update tg.APIUpdate) {
|
||||
// Handle inline queries (99% of the usage I hope)
|
||||
if update.Inline != nil {
|
||||
if update.Inline != nil && update.Inline.Query != "" {
|
||||
query := update.Inline.Query
|
||||
results, err := mlpapiSearch(query)
|
||||
if err != nil {
|
||||
|
@ -205,7 +205,7 @@ func getCardEntry(card CardData, flipped int) (string, string, []tg.APIInlineKey
|
|||
buttons := []tg.APIInlineKeyboardButton{
|
||||
{
|
||||
Text: "Ponyhead",
|
||||
URL: "http://ponyhead.com/cards/" + cid,
|
||||
URL: "https://ponyhead.com/cards/" + cid,
|
||||
},
|
||||
}
|
||||
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
package main
|
||||
|
||||
import (
|
||||
"crypto/tls"
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"net/http"
|
||||
|
@ -26,6 +27,9 @@ type CardData struct {
|
|||
|
||||
var netClient = &http.Client{
|
||||
Timeout: time.Second * 20,
|
||||
Transport: &http.Transport{
|
||||
TLSClientConfig: &tls.Config{InsecureSkipVerify: true},
|
||||
},
|
||||
}
|
||||
|
||||
func mlpapiSearch(query string) (results CardSearchResults, err error) {
|
||||
|
|
Loading…
Reference in a new issue