From f60be2d658de118a5f22a3ed9041a0d0c0330b1c Mon Sep 17 00:00:00 2001 From: Luke Barnard Date: Fri, 12 May 2017 16:12:17 +0100 Subject: [PATCH 1/2] Add welcomeUserId to sample config --- config.sample.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/config.sample.json b/config.sample.json index 3c513f7ab2..9be92fa747 100644 --- a/config.sample.json +++ b/config.sample.json @@ -10,5 +10,6 @@ "servers": [ "matrix.org" ] - } + }, + "welcomeUserId": "@RiotBot:matrix.org" } From 79d32868a6d804dbf305331b06aa1e3f1b5dd692 Mon Sep 17 00:00:00 2001 From: Luke Barnard Date: Tue, 16 May 2017 11:39:30 +0100 Subject: [PATCH 2/2] Replace NeedToRegister with SetMxId dialog --- src/components/structures/RightPanel.js | 6 +----- src/components/structures/RoomDirectory.js | 6 +----- 2 files changed, 2 insertions(+), 10 deletions(-) diff --git a/src/components/structures/RightPanel.js b/src/components/structures/RightPanel.js index 04a981196b..2c606e8c1d 100644 --- a/src/components/structures/RightPanel.js +++ b/src/components/structures/RightPanel.js @@ -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; } diff --git a/src/components/structures/RoomDirectory.js b/src/components/structures/RoomDirectory.js index 9104695938..964636579b 100644 --- a/src/components/structures/RoomDirectory.js +++ b/src/components/structures/RoomDirectory.js @@ -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; } }