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:
parent
6d7f52d2d6
commit
32b37ed8f0
4 changed files with 42 additions and 8 deletions
|
|
@ -47,7 +47,7 @@ export function RegisteredView({ client }) {
|
|||
setError(undefined);
|
||||
setLoading(true);
|
||||
|
||||
const roomIdOrAlias = await createRoom(client, roomName, ptt);
|
||||
const [roomIdOrAlias] = await createRoom(client, roomName, ptt);
|
||||
|
||||
if (roomIdOrAlias) {
|
||||
history.push(`/room/${roomIdOrAlias}`);
|
||||
|
|
|
|||
|
|
@ -70,7 +70,7 @@ export function UnauthenticatedView() {
|
|||
|
||||
let roomIdOrAlias;
|
||||
try {
|
||||
roomIdOrAlias = await createRoom(client, roomName, ptt);
|
||||
[roomIdOrAlias] = await createRoom(client, roomName, ptt);
|
||||
} catch (error) {
|
||||
if (error.errcode === "M_ROOM_IN_USE") {
|
||||
setOnFinished(() => () => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue