fix(calls): fix some bugs encountered during refactor

This commit is contained in:
Taso committed 2021-07-28 14:26:01 -04:00
1 parent 10c5e97088
commit af6e291368
9 files changed
+15 -15

No files matched your search

@@ -1,6 +1,7 @@
import {
CallEvents,
CallWasAcceptedEvent,
EndCallDTO,
InitializeCallDTO,
StartCallEventData,
TransmitterNumDTO,
@@ -57,7 +58,7 @@ onNetTyped<CallWasAcceptedEvent>(
// Rejected call
RegisterNuiCB<TransmitterNumDTO>(CallEvents.REJECTED, (data, cb: NuiCallbackFunc) => {
emitNet(CallEvents.REJECTED, data.transmitterNumber);
emitNetTyped<TransmitterNumDTO>(CallEvents.REJECTED, data);
cb({});
});
@@ -66,7 +67,7 @@ onNet(CallEvents.WAS_REJECTED, async () => {
animationService.endPhoneCall();
});
RegisterNuiCB<TransmitterNumDTO>(CallEvents.END_CALL, async (data, cb) => {
RegisterNuiCB<EndCallDTO>(CallEvents.END_CALL, async (data, cb) => {
try {
const serverRes: ServerPromiseResp<void> = await ClUtils.emitNetPromise(
CallEvents.END_CALL,
@@ -1,5 +1,6 @@
import { IAlertProps } from '../../../typings/alerts';
import { CallEvents, CallHistoryItem, CallRejectReasons } from '../../../typings/call';
import { animationService } from '../animations/animation.controller';
const exp = (global as any).exports;
@@ -45,6 +46,7 @@ export class CallService {
return emitNet(CallEvents.REJECTED, transmitter, CallRejectReasons.BUSY_LINE);
this.openCallModal(true);
animationService.startPhoneCall();
SendNUIMessage({
app: 'CALL',