@xuda.io/ai_module 1.1.4266 → 1.1.4268
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 +9 -0
- package/package.json +1 -1
package/index.mjs
CHANGED
|
@@ -4369,6 +4369,15 @@ const update_conversation_mood_level = async function (uid, target_contacts = []
|
|
|
4369
4369
|
for await (const target of target_contacts) {
|
|
4370
4370
|
const account_profile_info = await account_module.get_active_account_profile_info(target.uid);
|
|
4371
4371
|
let conversation_doc = await db_module.get_app_couch_doc_native(account_profile_info.app_id, conversation_id);
|
|
4372
|
+
conversation_doc.mood_level = mood_level_obj.mood_level;
|
|
4373
|
+
await db_module.save_app_couch_doc_native(account_profile_info.app_id, conversation_doc);
|
|
4374
|
+
|
|
4375
|
+
if (update_contact) {
|
|
4376
|
+
let contact_doc = await account_module.get_contact(target.uid, contact_id);
|
|
4377
|
+
sender_contact_doc.contact_mood_level = mood_level_obj.mood_level;
|
|
4378
|
+
sender_contact_doc.ts = Date.now();
|
|
4379
|
+
await account_module.save_contact(sender_uid, sender_contact_doc);
|
|
4380
|
+
}
|
|
4372
4381
|
}
|
|
4373
4382
|
|
|
4374
4383
|
//////// Sender
|