mirror of
https://github.com/darksaid98/new-phone-who-dis.git
synced 2026-12-05 06:28:51 +00:00
Merge branch 'feat/calling-lua-ts' of https://github.com/project-error/new-phone-who-dis into feat/calling-lua-ts
This commit is contained in:
commit
28774d24d8
1 file changed
+7
-19
@@ -83,11 +83,7 @@ onNet(
|
|||||||
const _identifier = await useIdentifier();
|
const _identifier = await useIdentifier();
|
||||||
addContact(_identifier, number, display, avatar);
|
addContact(_identifier, number, display, avatar);
|
||||||
emitNet(events.CONTACTS_ADD_CONTACT_SUCCESS, _source);
|
emitNet(events.CONTACTS_ADD_CONTACT_SUCCESS, _source);
|
||||||
emitNet(
|
emitNet(events.CONTACTS_ACTION_RESULT, _source, "CONTACT_ADD_SUCCESS");
|
||||||
events.CONTACTS_ACTION_RESULT,
|
|
||||||
_source,
|
|
||||||
"CONTACT_ADD_SUCCESS"
|
|
||||||
);
|
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
const _source = (global as any).source;
|
const _source = (global as any).source;
|
||||||
emitNet(events.CONTACTS_ACTION_RESULT, _source, "CONTACT_ADD_FAILED");
|
emitNet(events.CONTACTS_ACTION_RESULT, _source, "CONTACT_ADD_FAILED");
|
||||||
@@ -96,30 +92,22 @@ onNet(
|
|||||||
);
|
);
|
||||||
|
|
||||||
onNet(events.CONTACTS_UPDATE_CONTACT, async (contact: Contacts) => {
|
onNet(events.CONTACTS_UPDATE_CONTACT, async (contact: Contacts) => {
|
||||||
console.log('let me just log the contact first', contact);
|
console.log("let me just log the contact first", contact);
|
||||||
try {
|
try {
|
||||||
const _source = (global as any).source;
|
const _source = (global as any).source;
|
||||||
const _identifier = ESX.GetPlayerFromId(_source).getIdentifier();
|
const _identifier = ESX.GetPlayerFromId(_source).getIdentifier();
|
||||||
console.log('nice identifier bro', _identifier);
|
console.log("nice identifier bro", _identifier);
|
||||||
await updateContact(contact, _identifier);
|
await updateContact(contact, _identifier);
|
||||||
console.log('i updated the contact server side!');
|
console.log("i updated the contact server side!");
|
||||||
|
|
||||||
emitNet(events.CONTACTS_UPDATE_CONTACT_SUCCESS, _source);
|
emitNet(events.CONTACTS_UPDATE_CONTACT_SUCCESS, _source);
|
||||||
console.log('ffs, didd it return successful');
|
console.log("ffs, didd it return successful");
|
||||||
|
|
||||||
emitNet(
|
emitNet(events.CONTACTS_ACTION_RESULT, _source, "CONTACT_UPDATE_SUCCESS");
|
||||||
events.CONTACTS_ACTION_RESULT,
|
|
||||||
_source,
|
|
||||||
"CONTACT_UPDATE_SUCCESS"
|
|
||||||
);
|
|
||||||
console.log("UPDATED CONTACT: ", contact);
|
console.log("UPDATED CONTACT: ", contact);
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
const _source = (global as any).source;
|
const _source = (global as any).source;
|
||||||
emitNet(
|
emitNet(events.CONTACTS_ACTION_RESULT, _source, "CONTACT_UPDATE_FAILED");
|
||||||
events.CONTACTS_ACTION_RESULT,
|
|
||||||
_source,
|
|
||||||
"CONTACT_UPDATE_FAILED"
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user