You've already forked matrix-react-sdk
mirror of
https://github.com/matrix-org/matrix-react-sdk.git
synced 2025-06-26 04:01:04 +03:00
when starting chat from memberinfo, allow guest access. in future synapse should make guest_access a default for the private_chat preset.
This commit is contained in:
@ -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 });
|
||||
|
Reference in New Issue
Block a user