Replace NeedToRegister with SetMxId dialog

This commit is contained in:
Luke Barnard 2017-05-16 11:39:30 +01:00
parent 607ba57f48
commit 79d32868a6
2 changed files with 2 additions and 10 deletions

View file

@ -89,11 +89,7 @@ module.exports = React.createClass({
onInviteButtonClick: function() {
if (MatrixClientPeg.get().isGuest()) {
var NeedToRegisterDialog = sdk.getComponent("dialogs.NeedToRegisterDialog");
Modal.createDialog(NeedToRegisterDialog, {
title: "Please Register",
description: "Guest users can't invite users. Please register to invite."
});
dis.dispatch({action: 'view_set_mxid'});
return;
}

View file

@ -335,11 +335,7 @@ module.exports = React.createClass({
// to the directory.
if (MatrixClientPeg.get().isGuest()) {
if (!room.world_readable && !room.guest_can_join) {
var NeedToRegisterDialog = sdk.getComponent("dialogs.NeedToRegisterDialog");
Modal.createDialog(NeedToRegisterDialog, {
title: "Failed to join the room",
description: "This room is inaccessible to guests. You may be able to join if you register."
});
dis.dispatch({action: 'view_set_mxid'});
return;
}
}