Remove error logs when creating / not creating contact

This commit is contained in:
benthecarman
2023-06-08 16:22:24 -05:00
committed by Paul Miller
parent fe22e4cc8c
commit 23af8f576c
2 changed files with 0 additions and 20 deletions

View File

@@ -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 [];
}

View File

@@ -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 [];
}