mirror of
https://github.com/darksaid98/new-phone-who-dis.git
synced 2026-12-04 22:16:40 +00:00
updated for PR feedback
This commit is contained in:
1 parent
8009c073db
commit
048275212a
2 files changed
+1
-3
No files matched your search
@@ -32,7 +32,6 @@ async function addContact(
|
|||||||
"INSERT INTO npwd_phone_contacts (identifier, number, display, avatar) VALUES (?, ?, ?, ?)";
|
"INSERT INTO npwd_phone_contacts (identifier, number, display, avatar) VALUES (?, ?, ?, ?)";
|
||||||
|
|
||||||
const [result] = await pool.query(query, [identifier, number, display, avatar]);
|
const [result] = await pool.query(query, [identifier, number, display, avatar]);
|
||||||
console.log(result);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
async function updateContact(contact: Contacts, identifier: string): Promise<any> {
|
async function updateContact(contact: Contacts, identifier: string): Promise<any> {
|
||||||
@@ -71,7 +70,6 @@ onNet(events.CONTACTS_ADD_CONTACT, async (number: string, display: string, avata
|
|||||||
try {
|
try {
|
||||||
const _source = (global as any).source;
|
const _source = (global as any).source;
|
||||||
const _identifier = await useIdentifier()
|
const _identifier = await useIdentifier()
|
||||||
console.log(number, display);
|
|
||||||
addContact(_identifier, number, display, avatar);
|
addContact(_identifier, number, display, avatar);
|
||||||
emitNet(events.CONTACTS_ADD_CONTACT_SUCCESS, _source)
|
emitNet(events.CONTACTS_ADD_CONTACT_SUCCESS, _source)
|
||||||
|
|
||||||
|
|||||||
@@ -263,7 +263,7 @@ async function getFormattedMessageGroups(userIdentifier: string): Promise<Messag
|
|||||||
* we retrieve identifiers for each submitted phone number and
|
* we retrieve identifiers for each submitted phone number and
|
||||||
* then rows in npwd_messages_groups are created for each of them
|
* then rows in npwd_messages_groups are created for each of them
|
||||||
* bound to a unique groupId. The groupId is any unique string - we
|
* bound to a unique groupId. The groupId is any unique string - we
|
||||||
* use UUIDs here.
|
* use hashes here.
|
||||||
*
|
*
|
||||||
* These queries are batched with a transaction so that if any of
|
* These queries are batched with a transaction so that if any of
|
||||||
* them fail the queries are not committed to the database. This helps
|
* them fail the queries are not committed to the database. This helps
|
||||||
|
|||||||
Reference in new issue
Block a user