startCall: wait for startOutgoingDirectCall before updating lobby

Co-authored-by: Scott Nonnenberg <scott@signal.org>
This commit is contained in:
automated-signal 2022-04-01 10:48:20 -07:00 committed by GitHub
parent 4975d97f35
commit ee3a35d05d
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,