summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWim <wim@42.be>2016-07-22 23:47:25 +0200
committerWim <wim@42.be>2016-07-22 23:47:25 +0200
commitc769e23a9a31ab5114d6027412fa70053295fc14 (patch)
tree66a291f6cf0e8ca75752c9c892089a71d8d51c17
parent9db48f4794030eb217fe9be4bcc29573a905f0d8 (diff)
downloadmatterbridge-msglm-0.5.0-beta2.tar.gz
matterbridge-msglm-0.5.0-beta2.tar.bz2
matterbridge-msglm-0.5.0-beta2.zip
Fix crash on invalid teamv0.5.0-beta2
-rw-r--r--matterclient/matterclient.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/matterclient/matterclient.go b/matterclient/matterclient.go
index db6c54a3..a1efa957 100644
--- a/matterclient/matterclient.go
+++ b/matterclient/matterclient.go
@@ -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"