Skip to content

Commit

Permalink
legacyprovision: don't delete user logins on logout
Browse files Browse the repository at this point in the history
  • Loading branch information
tulir committed Sep 16, 2024
1 parent f5440b0 commit daef6e6
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
3 changes: 2 additions & 1 deletion cmd/mautrix-meta/legacyprovision.go
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,8 @@ func legacyProvLogout(w http.ResponseWriter, r *http.Request) {
user := m.Matrix.Provisioning.GetUser(r)
logins := user.GetUserLogins()
for _, login := range logins {
login.Logout(r.Context())
// Intentionally don't delete the user login, only disconnect the client
login.Client.(*connector.MetaClient).LogoutRemote(r.Context())
}
jsonResponse(w, http.StatusOK, Response{
Success: true,
Expand Down
1 change: 1 addition & 0 deletions pkg/connector/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -357,6 +357,7 @@ func (m *MetaClient) LogoutRemote(ctx context.Context) {
}
}
m.resetWADevice()
m.LoginMeta.Cookies = nil
}

func (m *MetaClient) canReconnect() bool {
Expand Down

0 comments on commit daef6e6

Please sign in to comment.