Don't pop up errors when this API fails for guests
This commit is contained in:
parent
776fe2ad70
commit
000ca35727
|
@ -82,6 +82,12 @@ module.exports = React.createClass({
|
||||||
MatrixClientPeg.get().getThirdpartyProtocols().done((response) => {
|
MatrixClientPeg.get().getThirdpartyProtocols().done((response) => {
|
||||||
this.protocols = response;
|
this.protocols = response;
|
||||||
}, (err) => {
|
}, (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");
|
const ErrorDialog = sdk.getComponent("dialogs.ErrorDialog");
|
||||||
Modal.createDialog(ErrorDialog, {
|
Modal.createDialog(ErrorDialog, {
|
||||||
title: "Failed to get protocol list from Home Server",
|
title: "Failed to get protocol list from Home Server",
|
||||||
|
|
Loading…
Reference in New Issue