Skip to content

Commit 79d3286

Browse files
author
Luke Barnard
committed
Replace NeedToRegister with SetMxId dialog
1 parent 607ba57 commit 79d3286

2 files changed

Lines changed: 2 additions & 10 deletions

File tree

‎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)