cinny/src/client/action/logout.js

14 lines
262 B
JavaScript
Raw Normal View History

2021-07-28 15:15:52 +02:00
import initMatrix from '../initMatrix';
function logout() {
const mx = initMatrix.matrixClient;
mx.stopClient();
2021-07-28 15:15:52 +02:00
mx.logout().then(() => {
mx.clearStores();
window.localStorage.clear();
window.location.reload();
});
}
export default logout;