Graceful calling lobby handling
This commit is contained in:
@@ -1783,8 +1783,6 @@ export class CallingClass {
|
|||||||
await processGroupCallRingCancellation(ringId);
|
await processGroupCallRingCancellation(ringId);
|
||||||
}
|
}
|
||||||
|
|
||||||
this.stopCallingLobby();
|
|
||||||
|
|
||||||
if (shouldRing) {
|
if (shouldRing) {
|
||||||
log.info('handleGroupCallRingUpdate: ringing');
|
log.info('handleGroupCallRingUpdate: ringing');
|
||||||
this.reduxInterface?.receiveIncomingGroupCall({
|
this.reduxInterface?.receiveIncomingGroupCall({
|
||||||
@@ -1888,8 +1886,6 @@ export class CallingClass {
|
|||||||
|
|
||||||
this.attachToCall(conversation, call);
|
this.attachToCall(conversation, call);
|
||||||
|
|
||||||
this.stopCallingLobby();
|
|
||||||
|
|
||||||
this.reduxInterface.receiveIncomingDirectCall({
|
this.reduxInterface.receiveIncomingDirectCall({
|
||||||
conversationId: conversation.id,
|
conversationId: conversation.id,
|
||||||
isVideoCall: call.isVideoCall,
|
isVideoCall: call.isVideoCall,
|
||||||
|
@@ -1025,10 +1025,21 @@ function keyChangeOk(
|
|||||||
|
|
||||||
function receiveIncomingDirectCall(
|
function receiveIncomingDirectCall(
|
||||||
payload: IncomingDirectCallType
|
payload: IncomingDirectCallType
|
||||||
): IncomingDirectCallActionType {
|
): ThunkAction<void, RootStateType, unknown, IncomingDirectCallActionType> {
|
||||||
return {
|
return (dispatch, getState) => {
|
||||||
type: INCOMING_DIRECT_CALL,
|
const callState = getState().calling;
|
||||||
payload,
|
|
||||||
|
if (
|
||||||
|
callState.activeCallState &&
|
||||||
|
callState.activeCallState.conversationId === payload.conversationId
|
||||||
|
) {
|
||||||
|
calling.stopCallingLobby();
|
||||||
|
}
|
||||||
|
|
||||||
|
dispatch({
|
||||||
|
type: INCOMING_DIRECT_CALL,
|
||||||
|
payload,
|
||||||
|
});
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user