You've already forked matrix-react-sdk
mirror of
https://github.com/matrix-org/matrix-react-sdk.git
synced 2025-12-23 21:02:09 +03:00
Clear query params from url with a nasty location update
This commit is contained in:
@@ -23,6 +23,8 @@ var sdk = require('../../index');
|
||||
var MatrixTools = require('../../MatrixTools');
|
||||
var linkifyMatrix = require("../../linkify-matrix");
|
||||
|
||||
var url = require('url');
|
||||
|
||||
module.exports = {
|
||||
PageTypes: {
|
||||
RoomView: "room_view",
|
||||
@@ -157,8 +159,13 @@ module.exports = {
|
||||
screen: undefined,
|
||||
logged_in: true
|
||||
});
|
||||
self.startMatrixClient();
|
||||
self.notifyNewScreen('');
|
||||
|
||||
// We're left with the login token, hs and is url as query params
|
||||
// in the url, a little nasty but let's redirect to clear them
|
||||
var parsedUrl = url.parse(window.location.href);
|
||||
parsedUrl.search = "";
|
||||
window.location.href = url.format(parsedUrl);
|
||||
|
||||
}, function(error) {
|
||||
self.notifyNewScreen('login');
|
||||
self.setState({errorText: 'Login failed.'});
|
||||
|
||||
Reference in New Issue
Block a user