Fix 'cannot find room' error
We weren't waiting for rooms to arrive down the sync stream after joining them but before trying to use them. More regression details in linked issue. Fixes https://github.com/vector-im/element-call/issues/477
This commit is contained in:
@@ -220,8 +220,8 @@ export function isLocalRoomId(roomId: string): boolean {
|
||||
export async function createRoom(
|
||||
client: MatrixClient,
|
||||
name: string
|
||||
): Promise<string> {
|
||||
await client.createRoom({
|
||||
): Promise<[string, string]> {
|
||||
const result = await client.createRoom({
|
||||
visibility: Visibility.Private,
|
||||
preset: Preset.PublicChat,
|
||||
name,
|
||||
@@ -251,7 +251,7 @@ export async function createRoom(
|
||||
},
|
||||
});
|
||||
|
||||
return fullAliasFromRoomName(name, client);
|
||||
return [fullAliasFromRoomName(name, client), result.room_id];
|
||||
}
|
||||
|
||||
export function getRoomUrl(roomId: string): string {
|
||||
|
||||
Reference in New Issue
Block a user