Merge pull request #172 from matrix-org/dbkr/guest_access_by_default

Allow guest access by default (by specifying initial state)
pull/21833/head
David Baker 2016-02-23 18:12:54 +00:00
commit f1dd3d381a
1 changed files with 13 additions and 1 deletions

View File

@ -381,7 +381,19 @@ module.exports = React.createClass({
var modal = Modal.createDialog(Loader);
MatrixClientPeg.get().createRoom({
preset: "private_chat"
preset: "private_chat",
// Allow guests by default since the room is private and they'd
// need an invite. This means clicking on a 3pid invite email can
// actually drop you right in to a chat.
initial_state: [
{
content: {
guest_access: 'can_join'
},
type: 'm.room.guest_access',
state_key: '',
}
],
}).done(function(res) {
modal.close();
dis.dispatch({