Handle servers from settings

Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com>
pull/21833/head
Šimon Brandner 2021-07-07 13:59:02 +02:00
parent 255ab49ccb
commit 5b5ef5e04c
No known key found for this signature in database
GPG Key ID: 9760693FDD98A790
1 changed files with 2 additions and 1 deletions

View File

@ -123,7 +123,8 @@ export default class RoomDirectory extends React.Component<IProps, IState> {
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 = [];