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.

This commit is contained in:
David Baker 2016-02-23 17:55:45 +00:00
parent b384d8c91a
commit 418bf8e39c

View file

@ -381,7 +381,16 @@ module.exports = React.createClass({
var modal = Modal.createDialog(Loader); var modal = Modal.createDialog(Loader);
MatrixClientPeg.get().createRoom({ 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) { }).done(function(res) {
modal.close(); modal.close();
dis.dispatch({ dis.dispatch({