This is an Element project (in the vector-im repo) so the Copyright
should be for New Vector: it was incorrectly attributed to the
foundation for some files (and some files were missing headers).
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.
Requires https://github.com/matrix-org/matrix-js-sdk/pull/2641
This (hopefully) fixes the remaining bug where extra group calls
could be created when entering a room.
We waited for the Room event to arrive, but didn't wait for the
group call event handler to actually process the event, so it would
have depended what order the event handlers were run in.
If this doesn't fix it, it at least adds logging so we'll have more
to go on next time.
Fixes https://github.com/vector-im/element-call/issues/563
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