mirror of
https://github.com/aljazceru/mutiny-web.git
synced 2026-02-11 17:24:25 +01:00
Remove error logs when creating / not creating contact
This commit is contained in:
committed by
Paul Miller
parent
fe22e4cc8c
commit
23af8f576c
@@ -174,20 +174,14 @@ export default function Receive() {
|
||||
async function processContacts(
|
||||
contacts: Partial<MutinyTagItem>[]
|
||||
): Promise<string[]> {
|
||||
console.log("Processing contacts", contacts);
|
||||
|
||||
if (contacts.length) {
|
||||
const first = contacts![0];
|
||||
|
||||
if (!first.name) {
|
||||
console.error(
|
||||
"Something went wrong with contact creation, proceeding anyway"
|
||||
);
|
||||
return [];
|
||||
}
|
||||
|
||||
if (!first.id && first.name) {
|
||||
console.error("Creating new contact", first.name);
|
||||
const c = new Contact(
|
||||
first.name,
|
||||
undefined,
|
||||
@@ -202,14 +196,10 @@ export default function Receive() {
|
||||
}
|
||||
|
||||
if (first.id) {
|
||||
console.error("Using existing contact", first.name, first.id);
|
||||
return [first.id];
|
||||
}
|
||||
}
|
||||
|
||||
console.error(
|
||||
"Something went wrong with contact creation, proceeding anyway"
|
||||
);
|
||||
return [];
|
||||
}
|
||||
|
||||
|
||||
@@ -376,20 +376,14 @@ export default function Send() {
|
||||
async function processContacts(
|
||||
contacts: Partial<MutinyTagItem>[]
|
||||
): Promise<string[]> {
|
||||
console.log("Processing contacts", contacts);
|
||||
|
||||
if (contacts.length) {
|
||||
const first = contacts![0];
|
||||
|
||||
if (!first.name) {
|
||||
console.error(
|
||||
"Something went wrong with contact creation, proceeding anyway"
|
||||
);
|
||||
return [];
|
||||
}
|
||||
|
||||
if (!first.id && first.name) {
|
||||
console.error("Creating new contact", first.name);
|
||||
const c = new Contact(
|
||||
first.name,
|
||||
undefined,
|
||||
@@ -404,14 +398,10 @@ export default function Send() {
|
||||
}
|
||||
|
||||
if (first.id) {
|
||||
console.error("Using existing contact", first.name, first.id);
|
||||
return [first.id];
|
||||
}
|
||||
}
|
||||
|
||||
console.error(
|
||||
"Something went wrong with contact creation, proceeding anyway"
|
||||
);
|
||||
return [];
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user