@xuda.io/ai_module 1.1.3801 → 1.1.3802
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 -5
- package/package.json +1 -1
package/index.mjs
CHANGED
|
@@ -4244,9 +4244,9 @@ const chat_note = async function (req, job_id, headers) {
|
|
|
4244
4244
|
|
|
4245
4245
|
const conversation_id = conversation_doc._id;
|
|
4246
4246
|
|
|
4247
|
-
const receiver_contact_doc = await account_module.get_contact_info(uid, null, conversation_doc.reference_id);
|
|
4248
|
-
const receiver_app_id = await account_module.get_account_default_project_id(receiver_contact_doc.contact_uid);
|
|
4249
|
-
let receiver_conversation_doc = await db_module.get_app_couch_doc_native(receiver_app_id, conversation_id);
|
|
4247
|
+
// const receiver_contact_doc = await account_module.get_contact_info(uid, null, conversation_doc.reference_id);
|
|
4248
|
+
// const receiver_app_id = await account_module.get_account_default_project_id(receiver_contact_doc.contact_uid);
|
|
4249
|
+
// let receiver_conversation_doc = await db_module.get_app_couch_doc_native(receiver_app_id, conversation_id);
|
|
4250
4250
|
|
|
4251
4251
|
const sender_contact_doc = await account_module.get_contact_info(uid, null, conversation_doc.reference_id);
|
|
4252
4252
|
const sender_app_id = await account_module.get_account_default_project_id(uid);
|
|
@@ -4262,8 +4262,8 @@ const chat_note = async function (req, job_id, headers) {
|
|
|
4262
4262
|
],
|
|
4263
4263
|
});
|
|
4264
4264
|
|
|
4265
|
-
const obj = { id: item.data[0].id, ts: Date.now(), uid, read: true };
|
|
4266
|
-
receiver_conversation_doc.messages.push(obj);
|
|
4265
|
+
const obj = { id: item.data[0].id, ts: Date.now(), uid, read: true, conversation_type: 'note' };
|
|
4266
|
+
// receiver_conversation_doc.messages.push(obj);
|
|
4267
4267
|
await db_module.save_app_couch_doc_native(receiver_app_id, receiver_conversation_doc);
|
|
4268
4268
|
sender_conversation_doc.messages.push({ ...obj, ...{ read: false } });
|
|
4269
4269
|
await db_module.save_app_couch_doc_native(sender_app_id, sender_conversation_doc);
|