@xuda.io/ai_module 1.1.4128 → 1.1.4130

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 +4 -1
  2. package/package.json +1 -1
package/index.mjs CHANGED
@@ -1723,7 +1723,7 @@ export const get_chat_conversation = async function (req) {
1723
1723
 
1724
1724
  export const get_ai_chats = async function (req, job_id, headers) {
1725
1725
  let { uid, reference_id, _id, search, filter_type = 'all', conversation_type, limit, skip, conversation_id } = req;
1726
-
1726
+ debugger;
1727
1727
  const active_account_profile_info = await account_module.get_active_account_profile_info(uid);
1728
1728
 
1729
1729
  const get_conversation_background = function (doc) {
@@ -1965,6 +1965,9 @@ export const archive_ai_chat = async function (req) {
1965
1965
  await team_module.validate_share_exist(uid, 'chat', conversation_id);
1966
1966
 
1967
1967
  let conversation_doc = await db_module.get_app_couch_doc_native(app_id, conversation_id);
1968
+
1969
+ if (conversation_doc.uid !== uid) throw new Error('Archive not allow');
1970
+
1968
1971
  conversation_doc.stat = 5;
1969
1972
  conversation_doc.ts = Date.now();
1970
1973
  const save_ret = await db_module.save_app_couch_doc(app_id, conversation_doc);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xuda.io/ai_module",
3
- "version": "1.1.4128",
3
+ "version": "1.1.4130",
4
4
  "description": "Xuda AI Module",
5
5
  "main": "index.mjs",
6
6
  "type": "module",