@xuda.io/account_module 1.2.1286 → 1.2.1287
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.mjs +11 -11
- package/package.json +1 -1
package/index.mjs
CHANGED
|
@@ -2101,11 +2101,11 @@ export const add_contact = async function (req, job_id, headers) {
|
|
|
2101
2101
|
const { uid, email, name, stat, contact_uid, context, source, team_req_id, metadata = {} } = req;
|
|
2102
2102
|
const account_profile_info = await get_active_account_profile_info(uid);
|
|
2103
2103
|
|
|
2104
|
-
const contact_ret = await db_module.get_couch_view_raw('xuda_contacts', 'contacts_by_user_email_address', { key: [account_profile_info.uid, email] });
|
|
2104
|
+
// const contact_ret = await db_module.get_couch_view_raw('xuda_contacts', 'contacts_by_user_email_address', { key: [account_profile_info.uid, email] });
|
|
2105
2105
|
|
|
2106
|
-
if (contact_ret.rows.length) {
|
|
2107
|
-
|
|
2108
|
-
}
|
|
2106
|
+
// if (contact_ret.rows.length) {
|
|
2107
|
+
// throw new Error('contact already exist active or deleted');
|
|
2108
|
+
// }
|
|
2109
2109
|
|
|
2110
2110
|
//////////////////
|
|
2111
2111
|
const opt = {
|
|
@@ -2144,13 +2144,13 @@ export const add_contact = async function (req, job_id, headers) {
|
|
|
2144
2144
|
} catch (error) {}
|
|
2145
2145
|
}
|
|
2146
2146
|
|
|
2147
|
-
const existing_contacts_ret = await db_module.get_couch_view_raw('xuda_contacts', 'contacts_by_email_address', { key: email });
|
|
2148
|
-
for (const contact of existing_contacts_ret.rows) {
|
|
2149
|
-
|
|
2150
|
-
|
|
2151
|
-
|
|
2152
|
-
|
|
2153
|
-
}
|
|
2147
|
+
// const existing_contacts_ret = await db_module.get_couch_view_raw('xuda_contacts', 'contacts_by_email_address', { key: email });
|
|
2148
|
+
// for (const contact of existing_contacts_ret.rows) {
|
|
2149
|
+
// if (contact.value.profile_avatar) {
|
|
2150
|
+
// profile_avatar = contact.value.profile_avatar;
|
|
2151
|
+
// profile_avatar_obj == contact.value.profile_avatar_obj;
|
|
2152
|
+
// }
|
|
2153
|
+
// }
|
|
2154
2154
|
}
|
|
2155
2155
|
const d = Date.now();
|
|
2156
2156
|
const doc = {
|