@xuda.io/ai_module 1.1.5531 → 1.1.5533
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 -5
- package/package.json +1 -1
package/index.mjs
CHANGED
|
@@ -4017,9 +4017,9 @@ const chat_email = async function (req, job_id, headers) {
|
|
|
4017
4017
|
if (perform_ai_execution) {
|
|
4018
4018
|
await attachment_handler(uid, sender_app_id, conversation_id, attachments, account_profile_info, conversation_doc.date_created_ts);
|
|
4019
4019
|
}
|
|
4020
|
-
let
|
|
4020
|
+
let conversation_item_reference_id;
|
|
4021
4021
|
try {
|
|
4022
|
-
add_conversation_item(uid, profile_id, conversation_id, body, 'email', conversation_doc.reference_id, { direction });
|
|
4022
|
+
conversation_item_reference_id = await add_conversation_item(uid, profile_id, conversation_id, body, 'email', conversation_doc.reference_id, { direction });
|
|
4023
4023
|
|
|
4024
4024
|
report_ai_status('conversations');
|
|
4025
4025
|
} catch (err) {
|
|
@@ -4041,7 +4041,7 @@ const chat_email = async function (req, job_id, headers) {
|
|
|
4041
4041
|
conversation_id,
|
|
4042
4042
|
text: body,
|
|
4043
4043
|
reference_id: conversation_doc.reference_id,
|
|
4044
|
-
conversation_item_reference_id
|
|
4044
|
+
conversation_item_reference_id,
|
|
4045
4045
|
direction,
|
|
4046
4046
|
role: 'user',
|
|
4047
4047
|
email_id,
|
|
@@ -6668,9 +6668,10 @@ const attachment_handler = async function (uid, app_id, conversation_id, attachm
|
|
|
6668
6668
|
} catch (error) {
|
|
6669
6669
|
process_stat = 'partial';
|
|
6670
6670
|
}
|
|
6671
|
-
let
|
|
6671
|
+
let conversation_item_reference_id;
|
|
6672
6672
|
if (transcript) {
|
|
6673
|
-
|
|
6673
|
+
conversation_item_reference_id = await add_transcript_conversation_item(uid, account_profile_info, conversation_id, 'attachment', file.filename, transcript);
|
|
6674
|
+
// items = await add_transcript_conversation_item(conversation_doc.reference_conversation_id, file.filename, transcript);
|
|
6674
6675
|
}
|
|
6675
6676
|
let out_conversation_item_obj = {
|
|
6676
6677
|
_id: await _common.xuda_get_uuid('chat_conversation_item'),
|