mirror of https://github.com/vector-im/riot-web
when starting chat from memberinfo, allow guest access. in future synapse should make guest_access a default for the private_chat preset.
parent
68a391e24b
commit
bbd57f2bdf
|
@ -467,6 +467,7 @@ module.exports = React.createClass({
|
|||
var Loader = sdk.getComponent("elements.Spinner");
|
||||
var modal = Modal.createDialog(Loader);
|
||||
|
||||
// XXX: FIXME: deduplicate this with MemberInfo's 'start chat' impl
|
||||
MatrixClientPeg.get().createRoom({
|
||||
preset: "private_chat",
|
||||
// Allow guests by default since the room is private and they'd
|
||||
|
|
|
@ -248,8 +248,21 @@ module.exports = React.createClass({
|
|||
else {
|
||||
self.setState({ creatingRoom: true });
|
||||
MatrixClientPeg.get().createRoom({
|
||||
// XXX: FIXME: deduplicate this with "view_create_room" in MatrixChat
|
||||
invite: [this.props.member.userId],
|
||||
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) {
|
||||
self.setState({ creatingRoom: false });
|
||||
|
|
Loading…
Reference in New Issue