parent
6f13783dcb
commit
75ade37892
2 changed files with 40 additions and 19 deletions
|
|
@ -380,6 +380,13 @@ export default {
|
|||
algorithm: "m.megolm.v1.aes-sha2",
|
||||
},
|
||||
},
|
||||
{
|
||||
type: "m.room.history_visibility",
|
||||
state_key: "",
|
||||
content: {
|
||||
history_visibility: "joined"
|
||||
}
|
||||
}
|
||||
],
|
||||
};
|
||||
} else {
|
||||
|
|
@ -403,6 +410,13 @@ export default {
|
|||
guest_access: "forbidden",
|
||||
},
|
||||
},
|
||||
{
|
||||
type: "m.room.history_visibility",
|
||||
state_key: "",
|
||||
content: {
|
||||
history_visibility: "joined"
|
||||
}
|
||||
}
|
||||
],
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -626,25 +626,32 @@ export default {
|
|||
// No room found, create one
|
||||
//
|
||||
const createRoomOptions = {
|
||||
visibility: "private", // Not listed!
|
||||
preset: "private_chat",
|
||||
initial_state: [
|
||||
{
|
||||
type: "m.room.encryption",
|
||||
state_key: "",
|
||||
content: {
|
||||
algorithm: "m.megolm.v1.aes-sha2",
|
||||
},
|
||||
},
|
||||
{
|
||||
type: "m.room.guest_access",
|
||||
state_key: "",
|
||||
content: {
|
||||
guest_access: "forbidden",
|
||||
},
|
||||
},
|
||||
],
|
||||
invite: [userId]
|
||||
visibility: "private", // Not listed!
|
||||
preset: "private_chat",
|
||||
initial_state: [
|
||||
{
|
||||
type: "m.room.encryption",
|
||||
state_key: "",
|
||||
content: {
|
||||
algorithm: "m.megolm.v1.aes-sha2",
|
||||
},
|
||||
},
|
||||
{
|
||||
type: "m.room.guest_access",
|
||||
state_key: "",
|
||||
content: {
|
||||
guest_access: "forbidden",
|
||||
},
|
||||
},
|
||||
{
|
||||
type: "m.room.history_visibility",
|
||||
state_key: "",
|
||||
content: {
|
||||
history_visibility: "joined",
|
||||
},
|
||||
},
|
||||
],
|
||||
invite: [userId],
|
||||
};
|
||||
return this.matrixClient
|
||||
.createRoom(createRoomOptions)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue