bad matrix cert ok

v0.5.10
bel 2022-02-02 07:12:18 -07:00
parent cdabce7a56
commit 003ffb1231
1 changed files with 14 additions and 1 deletions

View File

@ -2,6 +2,7 @@ package message
import (
"bytes"
"crypto/tls"
"fmt"
"io/ioutil"
"local/truckstop/config"
@ -45,7 +46,19 @@ func newMatrix(conf config.Matrix, cont string) Matrix {
}
func (m Matrix) getclient() (*gomatrix.Client, error) {
return gomatrix.NewClient(m.homeserver, m.username, m.token)
client, err := gomatrix.NewClient(m.homeserver, m.username, m.token)
if err != nil {
return nil, err
}
client.Client = &http.Client{
Timeout: time.Minute,
Transport: &http.Transport{
TLSClientConfig: &tls.Config{
InsecureSkipVerify: true,
},
},
}
return client, nil
}
func (m Matrix) Continuation() string {