@xuda.io/account_module 1.2.2221 → 1.2.2223

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.
Files changed (2) hide show
  1. package/index.mjs +7 -1
  2. 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;
@@ -3171,7 +3177,7 @@ export const delete_account_profile = async function (req, job_id, headers) {
3171
3177
  };
3172
3178
 
3173
3179
  export const unarchive_account_profile = async function (req) {
3174
- const { profile_id } = req;
3180
+ const { profile_id, uid } = req;
3175
3181
  try {
3176
3182
  const app_id = await get_account_default_project_id(uid);
3177
3183
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xuda.io/account_module",
3
- "version": "1.2.2221",
3
+ "version": "1.2.2223",
4
4
  "description": "Xuda Account Server Module",
5
5
  "main": "index.mjs",
6
6
  "dependencies": {