mirror of
https://github.com/element-hq/element-web.git
synced 2024-12-14 13:37:15 +03:00
Merge pull request #3924 from vector-im/luke/new-guest-access-need-to-set-mx-id
Replace NeedToRegister with SetMxId dialog
This commit is contained in:
commit
e6f6b8cebd
2 changed files with 2 additions and 10 deletions
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -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;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue