@xuda.io/ai_module 1.1.4422 → 1.1.4423
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 +0 -19
- package/package.json +1 -1
package/index.mjs
CHANGED
|
@@ -4197,29 +4197,10 @@ export const create_conversation = async function (req, job_id, headers) {
|
|
|
4197
4197
|
}
|
|
4198
4198
|
// write conversation to receiver
|
|
4199
4199
|
recipient_contact_id = contact_doc.connection_contact_id;
|
|
4200
|
-
// const sender_contact_ret = await db_module.get_couch_view_raw('xuda_contacts', 'contacts_by_contact_uid', { key: [receiver_contact_doc.contact_uid, uid] });
|
|
4201
|
-
|
|
4202
|
-
// const opt = {
|
|
4203
|
-
// selector: {
|
|
4204
|
-
// docType: 'contact',
|
|
4205
|
-
// stat: 3,
|
|
4206
|
-
// contact_uid: uid,
|
|
4207
|
-
// },
|
|
4208
|
-
// limit: 1,
|
|
4209
|
-
// fields: ['_id'],
|
|
4210
|
-
// };
|
|
4211
|
-
// const recipient_contact_ret = await account_module.find_contact_query(receiver_contact_doc.contact_uid, opt);
|
|
4212
|
-
|
|
4213
|
-
// if (!recipient_contact_ret?.docs?.length) {
|
|
4214
|
-
// throw new Error('sender contact id not found');
|
|
4215
|
-
// }
|
|
4216
|
-
// const recipient_contact_id = sender_contact_ret?.docs[0]._id;
|
|
4217
|
-
|
|
4218
4200
|
recipient_uid = contact_doc.connection_uid;
|
|
4219
4201
|
|
|
4220
4202
|
const app_id = await account_module.get_account_default_project_id(recipient_uid);
|
|
4221
4203
|
const save_ret = await db_module.save_app_couch_doc(app_id, { ...conversation_doc, ...{ uid: recipient_uid, reference_id: recipient_contact_id } });
|
|
4222
|
-
// contact_uid_chat_conversation = recipient_uid;
|
|
4223
4204
|
}
|
|
4224
4205
|
|
|
4225
4206
|
setTimeout(async () => {
|