@xuda.io/account_module 1.2.1596 → 1.2.1598
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 +5 -2
- package/package.json +1 -1
package/index.mjs
CHANGED
|
@@ -1931,7 +1931,6 @@ setTimeout(async () => {
|
|
|
1931
1931
|
|
|
1932
1932
|
export const add_contact = async function (req, job_id, headers) {
|
|
1933
1933
|
try {
|
|
1934
|
-
debugger;
|
|
1935
1934
|
const { uid, email, name, stat, contact_uid, context, source, team_req_id, metadata = {} } = req;
|
|
1936
1935
|
const account_profile_info = await get_active_account_profile_info(uid);
|
|
1937
1936
|
const { account_profile_obj } = account_profile_info;
|
|
@@ -1942,7 +1941,7 @@ export const add_contact = async function (req, job_id, headers) {
|
|
|
1942
1941
|
const opt = {
|
|
1943
1942
|
selector: {
|
|
1944
1943
|
docType: 'contact',
|
|
1945
|
-
stat:
|
|
1944
|
+
stat: { $lt: 4 },
|
|
1946
1945
|
email,
|
|
1947
1946
|
},
|
|
1948
1947
|
limit: 1,
|
|
@@ -2571,6 +2570,10 @@ export const get_account_profile_info = async function (uid, contact_profile_doc
|
|
|
2571
2570
|
doc.profile_picture = account_info_ret.data.profile_picture;
|
|
2572
2571
|
}
|
|
2573
2572
|
|
|
2573
|
+
if (!doc.account_type) {
|
|
2574
|
+
doc.account_type = account_info_ret.data.account_type;
|
|
2575
|
+
}
|
|
2576
|
+
|
|
2574
2577
|
const get_pattern = async function (doc) {
|
|
2575
2578
|
let ret = `default-pattern.png`;
|
|
2576
2579
|
|