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) {
|
func webhook(update tg.APIUpdate) {
|
||||||
// Handle inline queries (99% of the usage I hope)
|
// Handle inline queries (99% of the usage I hope)
|
||||||
if update.Inline != nil {
|
if update.Inline != nil && update.Inline.Query != "" {
|
||||||
query := update.Inline.Query
|
query := update.Inline.Query
|
||||||
results, err := mlpapiSearch(query)
|
results, err := mlpapiSearch(query)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
@ -205,7 +205,7 @@ func getCardEntry(card CardData, flipped int) (string, string, []tg.APIInlineKey
|
||||||
buttons := []tg.APIInlineKeyboardButton{
|
buttons := []tg.APIInlineKeyboardButton{
|
||||||
{
|
{
|
||||||
Text: "Ponyhead",
|
Text: "Ponyhead",
|
||||||
URL: "http://ponyhead.com/cards/" + cid,
|
URL: "https://ponyhead.com/cards/" + cid,
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
package main
|
package main
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"crypto/tls"
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
"fmt"
|
"fmt"
|
||||||
"net/http"
|
"net/http"
|
||||||
|
@ -26,6 +27,9 @@ type CardData struct {
|
||||||
|
|
||||||
var netClient = &http.Client{
|
var netClient = &http.Client{
|
||||||
Timeout: time.Second * 20,
|
Timeout: time.Second * 20,
|
||||||
|
Transport: &http.Transport{
|
||||||
|
TLSClientConfig: &tls.Config{InsecureSkipVerify: true},
|
||||||
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
func mlpapiSearch(query string) (results CardSearchResults, err error) {
|
func mlpapiSearch(query string) (results CardSearchResults, err error) {
|
||||||
|
|
Loading…
Reference in a new issue