From 5b5ef5e04c5f7ccfd77ba4c717c2a5f0a6f560cc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=A0imon=20Brandner?= Date: Wed, 7 Jul 2021 13:59:02 +0200 Subject: [PATCH] Handle servers from settings MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Šimon Brandner --- src/components/structures/RoomDirectory.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/components/structures/RoomDirectory.tsx b/src/components/structures/RoomDirectory.tsx index 3892c9da5c..4a0e7615c4 100644 --- a/src/components/structures/RoomDirectory.tsx +++ b/src/components/structures/RoomDirectory.tsx @@ -123,7 +123,8 @@ export default class RoomDirectory extends React.Component { const lsRoomServer = localStorage.getItem(LAST_SERVER_KEY); const lsInstanceId = localStorage.getItem(LAST_INSTANCE_KEY); const configSevers = SdkConfig.get().roomDirectory?.servers || []; - const roomServer = configSevers.includes(lsRoomServer) + const settingsServers = SettingsStore.getValue("room_directory_servers") || []; + const roomServer = [...configSevers, ...settingsServers].includes(lsRoomServer) ? lsRoomServer : myHomeserver; const instanceIds = [];