mirror of
https://github.com/cinnyapp/cinny.git
synced 2025-11-12 18:20:28 +03:00
Fix bug when creating room
Signed-off-by: Ajay Bura <ajbura@gmail.com>
This commit is contained in:
parent
79afc7649d
commit
8bc41c2c32
2 changed files with 12 additions and 4 deletions
|
|
@ -224,6 +224,17 @@ async function createRoom(opts) {
|
|||
});
|
||||
}
|
||||
if (parentId && joinRule === 'restricted') {
|
||||
try {
|
||||
const caps = await mx.getCapabilities();
|
||||
options.room_version = caps
|
||||
?.['m.room_versions']
|
||||
?.['org.matrix.msc3244.room_capabilities']
|
||||
?.restricted
|
||||
?.preferred
|
||||
|| undefined;
|
||||
} catch {
|
||||
console.error('Can\'t find room version for restricted.');
|
||||
}
|
||||
options.initial_state.push({
|
||||
type: 'm.room.join_rules',
|
||||
content: {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue