@xuda.io/ai_module 1.1.4530 → 1.1.4532

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 +5 -3
  2. package/package.json +1 -1
package/index.mjs CHANGED
@@ -4409,7 +4409,6 @@ const chat_note = async function (req, job_id, headers) {
4409
4409
  };
4410
4410
 
4411
4411
  const chat_email = async function (req, job_id, headers) {
4412
- debugger;
4413
4412
  const { uid, email_id, perform_ai_execution = true, from_mailbox } = req;
4414
4413
  const account_profile_info = await account_module.get_active_account_profile_info(uid);
4415
4414
  let { prompt: body, conversation_doc, attachments = [], ai_agents } = req;
@@ -4446,13 +4445,16 @@ const chat_email = async function (req, job_id, headers) {
4446
4445
  subject = subject_ret.data;
4447
4446
  }
4448
4447
 
4448
+ let email_attachments = [];
4449
+ for (const attachment of attachments) {
4450
+ email_attachments.push(await save_drive_file_to_disk(attachment));
4451
+ }
4452
+
4449
4453
  const email_module = await import(`${module_path}/email_module/index.mjs`);
4450
4454
  sent_email_result = await email_module.sendEmailFromAccount(email_account_doc, contact_info.email, subject, body, null, attachments);
4451
4455
  if (!sent_email_result.success) {
4452
4456
  throw new Error('error sending email');
4453
4457
  }
4454
- //// attachments
4455
- ///
4456
4458
  }
4457
4459
 
4458
4460
  if (perform_ai_execution) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xuda.io/ai_module",
3
- "version": "1.1.4530",
3
+ "version": "1.1.4532",
4
4
  "description": "Xuda AI Module",
5
5
  "main": "index.mjs",
6
6
  "type": "module",