For direct chats, set history visibility to "invited"

Also use "initial_state" to set admin(s).
This commit is contained in:
N-Pex 2023-05-11 13:55:43 +02:00
parent 663932beb1
commit f096350473

View file

@ -872,7 +872,17 @@ export default {
type: "m.room.history_visibility", type: "m.room.history_visibility",
state_key: "", state_key: "",
content: { content: {
history_visibility: "joined", history_visibility: "invited",
},
},
{
type: "m.room.power_levels",
state_key: "",
content: {
users: {
[this.currentUserId]: 100,
[userId]: 100,
},
}, },
}, },
], ],
@ -881,7 +891,6 @@ export default {
return this.matrixClient return this.matrixClient
.createRoom(createRoomOptions) .createRoom(createRoomOptions)
.then(({ room_id, room_alias }) => { .then(({ room_id, room_alias }) => {
this.makeAdmin(room_id, userId); // Make the other user an equal
resolve(this.getRoom(room_alias || room_id)); resolve(this.getRoom(room_alias || room_id));
}) })
.catch((error) => { .catch((error) => {