mirror of
https://github.com/darksaid98/new-phone-who-dis.git
synced 2026-12-03 14:38:45 +00:00
fix(contacts/client|server): fixed source for updating contacts
This commit is contained in:
1 parent
1913dd48df
commit
59ad36c7fd
3 files changed
+31
-16
No files matched your search
@@ -2,27 +2,22 @@
|
||||
"cellProvider": "AT&T",
|
||||
"language": "en",
|
||||
"wallpapers": [
|
||||
"default.png",
|
||||
"dragon.jpg",
|
||||
"legacy.jpg",
|
||||
"minimal.jpg",
|
||||
"waves.jpg",
|
||||
"surf.jpg",
|
||||
"beach.jpg"
|
||||
"beach.jpg",
|
||||
"weeb.png",
|
||||
"weeb2.gif"
|
||||
],
|
||||
"defaultSettings": {
|
||||
"wallpaper": "default.png",
|
||||
"wallpaper": "minimal.png",
|
||||
"frame": "s10.png",
|
||||
"theme": "taso-dark",
|
||||
"zoom": "100%",
|
||||
"ringtone": "pixel",
|
||||
"ringtoneVol": 100
|
||||
},
|
||||
"debug": {
|
||||
"printDebugLogs": true,
|
||||
"logLevel": 1
|
||||
},
|
||||
"frames": ["default.png", "s10.png", "tw.png", "samsung.png"],
|
||||
"frames": ["s10.png"],
|
||||
"zoomOptions": ["120%", "100%", "80%", "60%", "40%"],
|
||||
"ringtones": ["marimba", "pixel"],
|
||||
"themes": {
|
||||
|
||||
@@ -30,6 +30,7 @@ on(`__cfx_nui:${events.CONTACTS_UPDATE_CONTACT}`, (data: any) => {
|
||||
|
||||
onNet(events.CONTACTS_UPDATE_CONTACT_SUCCESS, () => {
|
||||
emitNet(events.CONTACTS_GET_CONTACTS);
|
||||
console.log("did you update the contact??????????????????");
|
||||
});
|
||||
|
||||
RegisterNuiCallbackType(events.CONTACTS_DELETE_CONTACT);
|
||||
|
||||
@@ -85,31 +85,50 @@ onNet(
|
||||
emitNet(events.CONTACTS_ADD_CONTACT_SUCCESS, _source);
|
||||
emitNet(
|
||||
events.CONTACTS_ACTION_RESULT,
|
||||
getSource(),
|
||||
'CONTACT_ADD_SUCCESS'
|
||||
_source,
|
||||
"CONTACT_ADD_SUCCESS"
|
||||
);
|
||||
} catch (error) {
|
||||
emitNet(events.CONTACTS_ACTION_RESULT, getSource(), 'CONTACT_ADD_FAILED');
|
||||
const _source = (global as any).source;
|
||||
emitNet(events.CONTACTS_ACTION_RESULT, _source, "CONTACT_ADD_FAILED");
|
||||
}
|
||||
}
|
||||
);
|
||||
|
||||
onNet(events.CONTACTS_UPDATE_CONTACT, async (contact: Contacts) => {
|
||||
console.log('let me just log the contact first', contact);
|
||||
try {
|
||||
const _source = (global as any)._source;
|
||||
const _identifier = await useIdentifier();
|
||||
updateContact(contact, _identifier);
|
||||
const _source = (global as any).source;
|
||||
const _identifier = ESX.GetPlayerFromId(_source).getIdentifier();
|
||||
console.log('nice identifier bro', _identifier);
|
||||
await updateContact(contact, _identifier);
|
||||
console.log('i updated the contact server side!');
|
||||
|
||||
emitNet(events.CONTACTS_UPDATE_CONTACT_SUCCESS, _source);
|
||||
console.log('ffs, didd it return successful');
|
||||
|
||||
emitNet(
|
||||
events.CONTACTS_ACTION_RESULT,
|
||||
<<<<<<< HEAD
|
||||
getSource(),
|
||||
'CONTACT_UPDATE_SUCCESS'
|
||||
=======
|
||||
_source,
|
||||
"CONTACT_UPDATE_SUCCESS"
|
||||
>>>>>>> 76aee07 (fix(contacts/client|server): fixed source for updating contacts)
|
||||
);
|
||||
console.log("UPDATED CONTACT: ", contact);
|
||||
} catch (error) {
|
||||
const _source = (global as any).source;
|
||||
emitNet(
|
||||
events.CONTACTS_ACTION_RESULT,
|
||||
<<<<<<< HEAD
|
||||
getSource(),
|
||||
'CONTACT_UPDATE_FAILED'
|
||||
=======
|
||||
_source,
|
||||
"CONTACT_UPDATE_FAILED"
|
||||
>>>>>>> 76aee07 (fix(contacts/client|server): fixed source for updating contacts)
|
||||
);
|
||||
}
|
||||
});
|
||||
|
||||
Reference in new issue
Block a user