@xuda.io/ai_module 1.1.4133 → 1.1.4136

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 +5 -2
  2. package/package.json +1 -1
package/index.mjs CHANGED
@@ -1966,7 +1966,9 @@ export const archive_ai_chat = async function (req) {
1966
1966
 
1967
1967
  let conversation_doc = await db_module.get_app_couch_doc_native(app_id, conversation_id);
1968
1968
 
1969
- if (conversation_doc.uid !== uid) throw new Error('Operation not allowed');
1969
+ if (conversation_doc.uid !== uid && conversation_doc.active_account_profile_info.shared_from_uid !== uid) {
1970
+ throw new Error('Operation not allowed');
1971
+ }
1970
1972
 
1971
1973
  conversation_doc.stat = 5;
1972
1974
  conversation_doc.ts = Date.now();
@@ -4194,7 +4196,8 @@ export const create_conversation = async function (req, job_id, headers) {
4194
4196
  conversation_obj,
4195
4197
  conversation_type,
4196
4198
  initiator_uid: uid,
4197
- account_profile_id: active_account_profile_info.account_profile_id,
4199
+ // account_profile_id: active_account_profile_info.account_profile_id,
4200
+ active_account_profile_info,
4198
4201
  };
4199
4202
  const save_ret = await db_module.save_app_couch_doc(active_account_profile_info.app_id, conversation_doc);
4200
4203
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xuda.io/ai_module",
3
- "version": "1.1.4133",
3
+ "version": "1.1.4136",
4
4
  "description": "Xuda AI Module",
5
5
  "main": "index.mjs",
6
6
  "type": "module",