From 000ca35727ff20389d37c4391b76d11dad465394 Mon Sep 17 00:00:00 2001 From: David Baker Date: Mon, 3 Oct 2016 16:30:57 +0100 Subject: [PATCH] Don't pop up errors when this API fails for guests --- src/components/structures/RoomDirectory.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/components/structures/RoomDirectory.js b/src/components/structures/RoomDirectory.js index 1b89ee2a3..a232d845b 100644 --- a/src/components/structures/RoomDirectory.js +++ b/src/components/structures/RoomDirectory.js @@ -82,6 +82,12 @@ module.exports = React.createClass({ MatrixClientPeg.get().getThirdpartyProtocols().done((response) => { this.protocols = response; }, (err) => { + if (MatrixClientPeg.get().isGuest()) { + // Guests currently aren't allowed to use this API, so + // ignore this as otherwise this error is literally the + // thing you see when loading the client! + return; + } const ErrorDialog = sdk.getComponent("dialogs.ErrorDialog"); Modal.createDialog(ErrorDialog, { title: "Failed to get protocol list from Home Server",