5
0
mirror of https://github.com/cwinfo/matterbridge.git synced 2024-12-25 04:55:41 +00:00

Fix crash on invalid team

This commit is contained in:
Wim 2016-07-22 23:47:25 +02:00
parent 9db48f4794
commit c769e23a9a

View File

@ -144,11 +144,11 @@ func (m *MMClient) Login() error {
return err
}
// set our team id as default route
m.Client.SetTeamId(m.Team.Id)
if m.Team == nil {
return errors.New("team not found")
}
// set our team id as default route
m.Client.SetTeamId(m.Team.Id)
// setup websocket connection
wsurl := wsScheme + m.Credentials.Server + "/api/v3/users/websocket"