From d3cd2e9e33600dab7d313d64eeb924009085f45d Mon Sep 17 00:00:00 2001 From: Michael Albert Date: Tue, 21 Apr 2020 14:00:57 +0200 Subject: [PATCH] Fix localStorage entry of homeserver url Change-Id: I206e3b4428df1f51d4281ad4db26bd64bdffb85d --- src/components/rooms.js | 2 +- src/components/users.js | 2 +- src/synapse/dataProvider.js | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/components/rooms.js b/src/components/rooms.js index 1e84958..dc2fc30 100644 --- a/src/components/rooms.js +++ b/src/components/rooms.js @@ -68,7 +68,7 @@ const validateAlias = fieldval => { if (fieldval === undefined) { return undefined; } - const homeserver = localStorage.getItem("home_server"); + const homeserver = localStorage.getItem("home_server_url"); if (approximateAliasLength(fieldval, homeserver) > 255) { return "synapseadmin.rooms.alias_too_long"; diff --git a/src/components/users.js b/src/components/users.js index 1fadb1c..8ee8ea7 100644 --- a/src/components/users.js +++ b/src/components/users.js @@ -97,7 +97,7 @@ export const UserList = props => ( ); function generateRandomUser() { - const homeserver = localStorage.getItem("home_server"); + const homeserver = localStorage.getItem("home_server_url"); const user_id = "@" + Array(8) diff --git a/src/synapse/dataProvider.js b/src/synapse/dataProvider.js index 0f24749..cae6e6c 100644 --- a/src/synapse/dataProvider.js +++ b/src/synapse/dataProvider.js @@ -76,7 +76,7 @@ const roomCreationMap = { const roomCreationProvider = { create: (resource, params) => { - const homeserver = localStorage.getItem("home_server"); + const homeserver = localStorage.getItem("home_server_url"); const homeserver_url = "https://" + homeserver + roomCreationMap.path;