From 84534dc1d2e6a98a850a2f57091f002157b22fc1 Mon Sep 17 00:00:00 2001 From: f0x Date: Fri, 29 Mar 2019 15:26:06 +0100 Subject: [PATCH] use same api url as for the login --- app.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app.js b/app.js index c706d0f..0a548e2 100644 --- a/app.js +++ b/app.js @@ -44,6 +44,7 @@ let App = create({ let user = document.getElementById("user").value let pass = document.getElementById("pass").value let hs = document.getElementById("hs").value + this.setState({apiUrl: hs}) hs = urllib.parse(hs) let data = { @@ -67,7 +68,7 @@ let App = create({ .then((responseJson) => { this.setState({json: responseJson}); if(responseJson.access_token != undefined) { - let backend = new Matrix(responseJson.user_id, responseJson.access_token, "https://"+responseJson.home_server) + let backend = new Matrix(responseJson.user_id, responseJson.access_token, this.state.apiUrl) this.setState({ backend: backend })