feat(calling/client|server): show dail history

This commit is contained in:
Christopher committed 2021-01-29 19:54:37 +01:00
1 parent f960d1414c
commit fbb3b07b7b
1 file changed
+13 -2
+13 -2
View File
@@ -1,6 +1,6 @@
import { ESX } from './client';
import events from '../utils/events';
import { ICall } from '../../phone/src/common/typings/call'
import { ICall, ICallUI } from '../../phone/src/common/typings/call'
const exp = (global as any).exports;
@@ -32,6 +32,7 @@ on(`__cfx_nui:${events.PHONE_ACCEPT_CALL}`, (data: any) => {
});
onNet(events.PHONE_CALL_WAS_ACCEPTED, (channelId: number, currentCall: ICall, isTransmitter: boolean) => {
exp['mumble-voip'].SetCallChannel(channelId);
SendNuiMessage(
@@ -102,4 +103,14 @@ function openCallModal(show: boolean) {
data: show,
})
);
}
}
onNet(events.PHONE_CALL_SEND_HISTORY, (calls: ICallUI) => {
SendNuiMessage(
JSON.stringify({
app: 'DAILER',
method: 'setHistory',
data: calls
})
)
})