From 418bf8e39ce81c337a88d6f71451281e04624445 Mon Sep 17 00:00:00 2001 From: David Baker Date: Tue, 23 Feb 2016 17:55:45 +0000 Subject: [PATCH] Allow guest access by default (by specifying initial state) as rooms are private by default so they'd have to be invited to join. People can't get a 3pid invite & join as guest without this. --- src/components/structures/MatrixChat.js | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/components/structures/MatrixChat.js b/src/components/structures/MatrixChat.js index b3d8d08ca7..fd32ce2dcd 100644 --- a/src/components/structures/MatrixChat.js +++ b/src/components/structures/MatrixChat.js @@ -381,7 +381,16 @@ module.exports = React.createClass({ var modal = Modal.createDialog(Loader); MatrixClientPeg.get().createRoom({ - preset: "private_chat" + preset: "private_chat", + initial_state: [ + { + content: { + guest_access: 'can_join' + }, + type: 'm.room.guest_access', + state_key: '', + } + ], }).done(function(res) { modal.close(); dis.dispatch({