Skip to content

Commit

Permalink
fix(phone/dialer): do not populate historty on accepted calls
Browse files Browse the repository at this point in the history
  • Loading branch information
itschip committed Mar 31, 2022
1 parent bc9c7bf commit b39ee45
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
1 change: 0 additions & 1 deletion resources/client/calls/cl_calls.controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,6 @@ RegisterNuiCB<TransmitterNumDTO>(CallEvents.ACCEPT_CALL, (data, cb) => {

onNetTyped<ActiveCall>(CallEvents.WAS_ACCEPTED, (callData) => {
callService.handleCallAccepted(callData);
CallService.sendDialerAction(CallEvents.WAS_ACCEPTED, callData);
});

// Rejected call
Expand Down
3 changes: 2 additions & 1 deletion resources/server/calls/calls.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -232,6 +232,7 @@ class CallsService {
// TODO: Need to get receiever number so we can return this as WAS_REJECTED so it gets added to the call history
emitNet(CallEvents.WAS_ENDED, reqObj.source);
resp({ status: 'ok' });
return;
}

const currentCall = this.callMap.get(transmitterNumber);
Expand All @@ -240,7 +241,7 @@ class CallsService {
callLogger.error(
`Call with transmitter number ${transmitterNumber} does not exist in current calls map!`,
);
resp({ status: 'error', errorMsg: 'DOES_NOT_EXIST' });
return resp({ status: 'error', errorMsg: 'DOES_NOT_EXIST' });
}

// Just in case currentCall for some reason at this point is falsy
Expand Down

0 comments on commit b39ee45

Please sign in to comment.