Use new method to wait until a room is ready for group calls #567
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
We were waiting for the group call event handler to process the room,
but only if we couldn't get the room from the client - if getRoom returned
a room, we just wouldn't wait. This just uses promises rather than
an event to wait for the room to be ready.
Looks like the failure was that we were getting a room from the store
and therefore not waiting for the event at all, but the fact that the room
was in the store doesn't mean it's been processed. We can't wait for
the event even if we got the room from the store because it may have
already happened in that case, so we'd be waiting forever for an event
that's already fired. Using promises fixes the race.
Requires matrix-org/matrix-js-sdk#2641