Merge branch 'new-guest-access' into luke/new-guest-access-set-pwd-dialog

pull/3921/head
Luke Barnard 2017-05-16 13:49:18 +01:00
commit 36ec39ffc0
3 changed files with 4 additions and 11 deletions

View File

@ -10,5 +10,6 @@
"servers": [ "servers": [
"matrix.org" "matrix.org"
] ]
} },
"welcomeUserId": "@RiotBot:matrix.org"
} }

View File

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

View File

@ -335,11 +335,7 @@ module.exports = React.createClass({
// to the directory. // to the directory.
if (MatrixClientPeg.get().isGuest()) { if (MatrixClientPeg.get().isGuest()) {
if (!room.world_readable && !room.guest_can_join) { if (!room.world_readable && !room.guest_can_join) {
var NeedToRegisterDialog = sdk.getComponent("dialogs.NeedToRegisterDialog"); dis.dispatch({action: 'view_set_mxid'});
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."
});
return; return;
} }
} }