diff --git a/message/matrix.go b/message/matrix.go index 1e7b2ae..6cf6c4c 100644 --- a/message/matrix.go +++ b/message/matrix.go @@ -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 {