Start to factor out session-loading magic

Take some of the magic out of MatrixChat.componentDidMount() into a new
component.

Also delete the MatrixChat test. It wasn't really doing much, is broken by the
change, and I am replacing it with (better) app-level tests in the vector
project.
This commit is contained in:
Richard van der Hoff 2016-08-10 00:03:29 +01:00
parent 0351ab0a3d
commit 24841cc5c4
5 changed files with 200 additions and 109 deletions

View file

@ -26,7 +26,9 @@ import dis from './dispatcher';
*/
function setLoggedIn(credentials) {
credentials.guest = Boolean(credentials.guest);
console.log("onLoggedIn => %s (guest=%s)", credentials.userId, credentials.guest);
console.log("onLoggedIn => %s (guest=%s) hs=%s",
credentials.userId, credentials.guest,
credentials.homeserverUrl);
MatrixClientPeg.replaceUsingCreds(credentials);
dis.dispatch({action: 'on_logged_in'});