Skip to content

Commit 36ec39f

Browse files
author
Luke Barnard
committed
Merge branch 'new-guest-access' into luke/new-guest-access-set-pwd-dialog
2 parents 48856c3 + e6f6b8c commit 36ec39f

3 files changed

Lines changed: 4 additions & 11 deletions

File tree

‎config.sample.json‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,5 +10,6 @@
1010
"servers": [
1111
"matrix.org"
1212
]
13-
}
13+
},
14+
"welcomeUserId": "@RiotBot:matrix.org"
1415
}

‎src/components/structures/RightPanel.js‎

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -89,11 +89,7 @@ module.exports = React.createClass({
8989

9090
onInviteButtonClick: function() {
9191
if (MatrixClientPeg.get().isGuest()) {
92-
var NeedToRegisterDialog = sdk.getComponent("dialogs.NeedToRegisterDialog");
93-
Modal.createDialog(NeedToRegisterDialog, {
94-
title: "Please Register",
95-
description: "Guest users can't invite users. Please register to invite."
96-
});
92+
dis.dispatch({action: 'view_set_mxid'});
9793
return;
9894
}
9995

‎src/components/structures/RoomDirectory.js‎

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -335,11 +335,7 @@ module.exports = React.createClass({
335335
// to the directory.
336336
if (MatrixClientPeg.get().isGuest()) {
337337
if (!room.world_readable && !room.guest_can_join) {
338-
var NeedToRegisterDialog = sdk.getComponent("dialogs.NeedToRegisterDialog");
339-
Modal.createDialog(NeedToRegisterDialog, {
340-
title: "Failed to join the room",
341-
description: "This room is inaccessible to guests. You may be able to join if you register."
342-
});
338+
dis.dispatch({action: 'view_set_mxid'});
343339
return;
344340
}
345341
}

0 commit comments

Comments
 (0)