Fix group call outgoing ring
Co-authored-by: ayumi-signal <143036029+ayumi-signal@users.noreply.github.com>
This commit is contained in:
parent
281fd6054c
commit
6b0c63fccc
2 changed files with 31 additions and 8 deletions
|
@ -2137,14 +2137,23 @@ export function reducer(
|
||||||
remoteParticipants,
|
remoteParticipants,
|
||||||
...ringState,
|
...ringState,
|
||||||
};
|
};
|
||||||
newAdhocCalls =
|
|
||||||
callMode === CallMode.Adhoc
|
if (callMode === CallMode.Group) {
|
||||||
? {
|
outgoingRing =
|
||||||
...adhocCalls,
|
!ringState.ringId &&
|
||||||
[conversationId]: call,
|
!call.peekInfo?.acis.length &&
|
||||||
}
|
!call.remoteParticipants.length &&
|
||||||
: adhocCalls;
|
!action.payload.isConversationTooBigToRing;
|
||||||
outgoingRing = false;
|
newAdhocCalls = adhocCalls;
|
||||||
|
} else if (callMode === CallMode.Adhoc) {
|
||||||
|
outgoingRing = false;
|
||||||
|
newAdhocCalls = {
|
||||||
|
...adhocCalls,
|
||||||
|
[conversationId]: call,
|
||||||
|
};
|
||||||
|
} else {
|
||||||
|
throw missingCaseError(action.payload);
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
default:
|
default:
|
||||||
|
|
|
@ -2102,6 +2102,20 @@ describe('calling duck', () => {
|
||||||
assert.strictEqual(call.ringId, BigInt(987));
|
assert.strictEqual(call.ringId, BigInt(987));
|
||||||
assert.strictEqual(call.ringerAci, ringerAci);
|
assert.strictEqual(call.ringerAci, ringerAci);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
it('enables outgoingRing for a group call when there is no existing call', async () => {
|
||||||
|
const result = await getState(getEmptyState(), {
|
||||||
|
callMode: CallMode.Group,
|
||||||
|
hasLocalAudio: true,
|
||||||
|
hasLocalVideo: true,
|
||||||
|
connectionState: GroupCallConnectionState.Connected,
|
||||||
|
joinState: GroupCallJoinState.NotJoined,
|
||||||
|
peekInfo: undefined,
|
||||||
|
remoteParticipants: [],
|
||||||
|
});
|
||||||
|
|
||||||
|
assert.isTrue(result.activeCallState?.outgoingRing);
|
||||||
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue