@xuda.io/ai_module 1.1.4521 → 1.1.4523
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 -4
- package/package.json +1 -1
package/index.mjs
CHANGED
|
@@ -4447,11 +4447,12 @@ const chat_email = async function (req, job_id, headers) {
|
|
|
4447
4447
|
}
|
|
4448
4448
|
|
|
4449
4449
|
const email_module = await import(`${module_path}/email_module/index.mjs`);
|
|
4450
|
-
const
|
|
4451
|
-
if (!
|
|
4450
|
+
const sent_email_result = await email_module.sendEmailFromAccount(email_account_doc, contact_info.email, subject, body, null, attachments);
|
|
4451
|
+
if (!sent_email_result.success) {
|
|
4452
4452
|
throw new Error('error sending email');
|
|
4453
4453
|
}
|
|
4454
|
-
|
|
4454
|
+
//// attachments
|
|
4455
|
+
///
|
|
4455
4456
|
}
|
|
4456
4457
|
|
|
4457
4458
|
if (perform_ai_execution) {
|
|
@@ -4472,7 +4473,7 @@ const chat_email = async function (req, job_id, headers) {
|
|
|
4472
4473
|
sender_conversation_doc.messages.push(obj);
|
|
4473
4474
|
await db_module.save_app_couch_doc_native(sender_app_id, sender_conversation_doc);
|
|
4474
4475
|
|
|
4475
|
-
const save_ret = await db_module.save_app_couch_doc_native(sender_app_id, { _id: obj.id, stat: 3, docType: 'chat_conversation_item', ts: obj.ts, uid, conversation_type: obj.conversation_type, date_created_ts: obj.ts, conversation_id, body, email_id
|
|
4476
|
+
const save_ret = await db_module.save_app_couch_doc_native(sender_app_id, { _id: obj.id, stat: 3, docType: 'chat_conversation_item', sent_email_result, ts: obj.ts, uid, conversation_type: obj.conversation_type, date_created_ts: obj.ts, conversation_id, body, email_id });
|
|
4476
4477
|
|
|
4477
4478
|
return save_ret;
|
|
4478
4479
|
} catch (err) {
|