diff options
author | Wim <wim@42.be> | 2017-07-01 22:41:28 +0200 |
---|---|---|
committer | Wim <wim@42.be> | 2017-07-01 22:41:28 +0200 |
commit | d261949db2de47578812f852d5c6d5c04d202323 (patch) | |
tree | 851221203c79b20ba21593a37ec237199aff394e | |
parent | 877f0fe2e82ab7f502eb0578dadf0c60b7a472fe (diff) | |
download | matterbridge-msglm-d261949db2de47578812f852d5c6d5c04d202323.tar.gz matterbridge-msglm-d261949db2de47578812f852d5c6d5c04d202323.tar.bz2 matterbridge-msglm-d261949db2de47578812f852d5c6d5c04d202323.zip |
Don't logout if logging in through token. (from @recht matterircd fork)
-rw-r--r-- | matterclient/matterclient.go | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/matterclient/matterclient.go b/matterclient/matterclient.go index afcedcd6..4dcc9ae0 100644 --- a/matterclient/matterclient.go +++ b/matterclient/matterclient.go @@ -229,6 +229,10 @@ func (m *MMClient) Logout() error { m.WsQuit = true m.WsClient.Close() m.WsClient.UnderlyingConn().Close() + if strings.Contains(m.Credentials.Pass, model.SESSION_COOKIE_TOKEN) { + m.log.Debug("Not invalidating session in logout, credential is a token") + return nil + } _, err := m.Client.Logout() if err != nil { return err |