mirror of
https://github.com/cwinfo/matterbridge.git
synced 2024-11-14 03:50:26 +00:00
Use API_URL_SUFFIX_V3 (mattermost)
This commit is contained in:
parent
eacb1c1771
commit
95f4e3448e
@ -159,11 +159,11 @@ func (m *MMClient) Login() error {
|
|||||||
m.Client.SetTeamId(m.Team.Id)
|
m.Client.SetTeamId(m.Team.Id)
|
||||||
|
|
||||||
// setup websocket connection
|
// setup websocket connection
|
||||||
wsurl := wsScheme + m.Credentials.Server + model.API_URL_SUFFIX + "/users/websocket"
|
wsurl := wsScheme + m.Credentials.Server + model.API_URL_SUFFIX_V3 + "/users/websocket"
|
||||||
header := http.Header{}
|
header := http.Header{}
|
||||||
header.Set(model.HEADER_AUTH, "BEARER "+m.Client.AuthToken)
|
header.Set(model.HEADER_AUTH, "BEARER "+m.Client.AuthToken)
|
||||||
|
|
||||||
m.log.Debug("WsClient: making connection")
|
m.log.Debugf("WsClient: making connection: %s", wsurl)
|
||||||
for {
|
for {
|
||||||
wsDialer := &websocket.Dialer{Proxy: http.ProxyFromEnvironment, TLSClientConfig: &tls.Config{InsecureSkipVerify: m.SkipTLSVerify}}
|
wsDialer := &websocket.Dialer{Proxy: http.ProxyFromEnvironment, TLSClientConfig: &tls.Config{InsecureSkipVerify: m.SkipTLSVerify}}
|
||||||
m.WsClient, _, err = wsDialer.Dial(wsurl, header)
|
m.WsClient, _, err = wsDialer.Dial(wsurl, header)
|
||||||
|
Loading…
Reference in New Issue
Block a user