@xuda.io/ai_module 1.1.5476 → 1.1.5478

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.
Files changed (2) hide show
  1. package/index.mjs +2 -13
  2. package/package.json +1 -1
package/index.mjs CHANGED
@@ -1539,19 +1539,8 @@ export const delete_conversation_item = async function (req) {
1539
1539
  conversation_item_doc.stat = 4;
1540
1540
  conversation_item_doc.ts = Date.now();
1541
1541
  save_ret = await db_module.save_app_couch_doc(account_profile_info.app_id, conversation_item_doc);
1542
-
1543
- await client.conversations.items.delete(conversation_doc.reference_conversation_id, conversation_item_doc.conversation_item_reference_id);
1544
-
1545
- for (const msg of conversation_doc?.messages || []) {
1546
- for (const attachment of msg?.attachments || []) {
1547
- try {
1548
- if (attachment.id) client.files.delete(attachment.id);
1549
- } catch (error) {}
1550
- }
1551
- }
1552
-
1553
- if (conversation_doc?.chat_image?.[0]) {
1554
- drive_msa.delete_drive_files({ uid, drive_type: 'user', files_arr: [{ type: 'file', file_path: path.join(conversation_doc.chat_image[0].file_path, conversation_doc.chat_image[0].filename) }] });
1542
+ if (conversation_item_doc?.conversation_item_reference_id) {
1543
+ await client.conversations.items.delete(conversation_doc.reference_conversation_id, conversation_item_doc.conversation_item_reference_id);
1555
1544
  }
1556
1545
 
1557
1546
  return save_ret;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xuda.io/ai_module",
3
- "version": "1.1.5476",
3
+ "version": "1.1.5478",
4
4
  "description": "Xuda AI Module",
5
5
  "main": "index.mjs",
6
6
  "type": "module",