bad matrix cert ok
parent
cdabce7a56
commit
003ffb1231
|
|
@ -2,6 +2,7 @@ package message
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"bytes"
|
"bytes"
|
||||||
|
"crypto/tls"
|
||||||
"fmt"
|
"fmt"
|
||||||
"io/ioutil"
|
"io/ioutil"
|
||||||
"local/truckstop/config"
|
"local/truckstop/config"
|
||||||
|
|
@ -45,7 +46,19 @@ func newMatrix(conf config.Matrix, cont string) Matrix {
|
||||||
}
|
}
|
||||||
|
|
||||||
func (m Matrix) getclient() (*gomatrix.Client, error) {
|
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 {
|
func (m Matrix) Continuation() string {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue