Skip to content

Commit

Permalink
fix(apps/game): missing arguments for isAnonymous
Browse files Browse the repository at this point in the history
  • Loading branch information
itschip committed Sep 30, 2023
1 parent 99bf907 commit 96fad12
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions apps/game/client/calls/cl_calls.controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,9 @@ export const initializeCallHandler = async (data: InitializeCallDTO, cb?: NuiCal
if (serverRes.status !== 'ok') {
return cb?.(serverRes);
}
const { transmitter, isTransmitter, receiver, isUnavailable } = serverRes.data;
const { transmitter, isTransmitter, receiver, isUnavailable, isAnonymous } = serverRes.data;
// Start the process of giving NUI feedback by opening NUI modal
callService.handleStartCall(transmitter, receiver, isTransmitter, isUnavailable);
callService.handleStartCall(transmitter, receiver, isTransmitter, isUnavailable, isAnonymous);
cb?.(serverRes);
} catch (e) {
console.error(e);
Expand Down
4 changes: 2 additions & 2 deletions apps/game/client/cl_exports.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,10 @@ exps('setPhoneDisabled', (bool: boolean | number) => {
exps('isPhoneDisabled', () => global.isPhoneDisabled);

// Takes in a number to start the call with
exps('startPhoneCall', (number: string) => {
exps('startPhoneCall', (number: string, isAnonymous = false) => {
verifyExportArgType('startPhoneCall', number, ['string']);

initializeCallHandler({ receiverNumber: number });
initializeCallHandler({ receiverNumber: number, isAnonymous });
});

// Will automatically open the contacts app start the new contact process
Expand Down
4 changes: 2 additions & 2 deletions apps/game/server/calls/calls.controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@ onNetPromise<InitializeCallDTO, ActiveCall>(CallEvents.INITIALIZE_CALL, async (r
message,
});
},
forward: (receiverNumber) => {
CallService.handleInitializeCall({ ...reqObj, data: { receiverNumber } }, resp)
forward: (receiverNumber: string, isAnonymous = false) => {
CallService.handleInitializeCall({ ...reqObj, data: { receiverNumber, isAnonymous } }, resp)
.catch((e) => {
resp({ status: 'error', errorMsg: 'SERVER_ERROR' });
callLogger.error(`Error occured handling init call: ${e.message}`);
Expand Down

0 comments on commit 96fad12

Please sign in to comment.