Update error message

pull/21833/head
David Baker 2016-03-22 13:19:29 +00:00
parent 6dce555865
commit 463212fb2a
2 changed files with 13 additions and 5 deletions

View File

@ -89,7 +89,7 @@ module.exports = React.createClass({
var NeedToRegisterDialog = sdk.getComponent("dialogs.NeedToRegisterDialog");
Modal.createDialog(NeedToRegisterDialog, {
title: "Please Register",
description: "Guest users can't create new rooms. Please register to create room and start a chat."
description: "Saving room color settings is only available to registered users"
});
}
});

View File

@ -170,10 +170,18 @@ module.exports = React.createClass({
// get out of sync if we force setState here!
console.log("Mod toggle success");
}, function(err) {
Modal.createDialog(ErrorDialog, {
title: "Mod error",
description: err.message
});
if (err.errcode == 'M_GUEST_ACCESS_FORBIDDEN') {
var NeedToRegisterDialog = sdk.getComponent("dialogs.NeedToRegisterDialog");
Modal.createDialog(NeedToRegisterDialog, {
title: "Please Register",
description: "This action cannot be performed by a guest user. Please register to be able to do this."
});
} else {
Modal.createDialog(ErrorDialog, {
title: "Mod error",
description: err.message
});
}
}
);
this.props.onFinished();