Prettified Code!

This commit is contained in:
itschip authored and GitHub Action committed 2021-01-31 01:53:49 +00:00
1 parent bf79f85336
commit 856a7ef7ef
1 file changed
+10 -6
+10 -6
View File
@@ -53,12 +53,16 @@ async function fetchCalls(phoneNumber: string): Promise<ICallUI[]> {
let calls: Map<string, ICall> = new Map();
onNet(events.PHONE_INITIALIZE_CALL, async (phoneNumber: string, timestamp: string) => {
onNet(
events.PHONE_INITIALIZE_CALL,
async (phoneNumber: string, timestamp: string) => {
const _source = (global as any).source;
// the client that is calling
const xTransmitter = ESX.GetPlayerFromId(_source);
const transmitterNumber = await usePhoneNumber(xTransmitter.getIdentifier());
const transmitterNumber = await usePhoneNumber(
xTransmitter.getIdentifier()
);
// player who is being called
const receiverIdentifier = await getIdentifierByPhoneNumber(phoneNumber);
@@ -70,11 +74,11 @@ onNet(events.PHONE_INITIALIZE_CALL, async (phoneNumber: string, timestamp: strin
transmitterSource: _source,
receiver: receiverNumber,
receiverSource: xReceiver.source,
timestamp: timestamp
timestamp: timestamp,
});
const currentCall = calls.get(transmitterNumber);
await saveCall(currentCall)
await saveCall(currentCall);
// events
// client that is calling
@@ -94,8 +98,8 @@ onNet(events.PHONE_INITIALIZE_CALL, async (phoneNumber: string, timestamp: strin
receiverNumber,
false
);
});
}
);
onNet(events.PHONE_ACCEPT_CALL, async (transmitterNumber: string) => {
try {