mirror of
https://github.com/cwinfo/matterbridge.git
synced 2024-11-22 23:00:28 +00:00
Don't logout if logging in through token. (from @recht matterircd fork)
This commit is contained in:
parent
877f0fe2e8
commit
d261949db2
@ -229,6 +229,10 @@ func (m *MMClient) Logout() error {
|
|||||||
m.WsQuit = true
|
m.WsQuit = true
|
||||||
m.WsClient.Close()
|
m.WsClient.Close()
|
||||||
m.WsClient.UnderlyingConn().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()
|
_, err := m.Client.Logout()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
|
Loading…
Reference in New Issue
Block a user