startCall: wait for startOutgoingDirectCall before updating lobby

This commit is contained in:
Scott Nonnenberg 2022-03-31 18:06:35 -07:00 committed by GitHub
parent b066d04817
commit bb250d4fb5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 3 deletions

View File

@ -1220,7 +1220,7 @@ function startCall(
return async (dispatch, getState) => {
switch (payload.callMode) {
case CallMode.Direct:
calling.startOutgoingDirectCall(
await calling.startOutgoingDirectCall(
payload.conversationId,
payload.hasLocalAudio,
payload.hasLocalVideo

View File

@ -1904,9 +1904,9 @@ describe('calling duck', () => {
sinon.assert.notCalled(this.callingStartOutgoingDirectCall);
});
it('saves direct calls and makes them active', () => {
it('saves direct calls and makes them active', async () => {
const dispatch = sinon.spy();
startCall({
await startCall({
callMode: CallMode.Direct,
conversationId: 'fake-conversation-id',
hasLocalAudio: true,