@xuda.io/account_module 1.2.2221 → 1.2.2222
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 +6 -0
- package/package.json +1 -1
package/index.mjs
CHANGED
|
@@ -2716,7 +2716,13 @@ export const generate_contact_avatar = async function (req, job_id, headers) {
|
|
|
2716
2716
|
const { contact_id, uid } = req;
|
|
2717
2717
|
const account_profile_info = await get_active_account_profile_info(uid);
|
|
2718
2718
|
try {
|
|
2719
|
+
const account_doc = await db_module.get_couch_doc_native('xuda_accounts', uid);
|
|
2720
|
+
if (account_doc.membership_plan == 'free' && account_doc.ai_workspace_plan == 'free_ai_workspace') {
|
|
2721
|
+
throw new Error('cannot read emails for free account');
|
|
2722
|
+
}
|
|
2723
|
+
|
|
2719
2724
|
var contact_doc = await get_contact(uid, contact_id);
|
|
2725
|
+
|
|
2720
2726
|
contact_doc.profile_picture_obj = null;
|
|
2721
2727
|
contact_doc.profile_picture = null;
|
|
2722
2728
|
contact_doc.profile_avatar_obj = null;
|