@xuda.io/ai_module 1.1.4260 → 1.1.4261

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 -0
  2. package/package.json +1 -1
package/index.mjs CHANGED
@@ -4182,6 +4182,10 @@ export const create_conversation = async function (req, job_id, headers) {
4182
4182
  receiver_contact_id = reference_id;
4183
4183
  receiver_contact_doc = await account_module.get_contact_info(uid, null, receiver_contact_id);
4184
4184
  if (conversation_type === 'chat') {
4185
+ if (!receiver_contact_doc?.contact_uid) {
4186
+ throw new Error('chat conversation to non user recipient is not allowed');
4187
+ }
4188
+
4185
4189
  if (receiver_contact_doc?.connection_stat !== 3) {
4186
4190
  throw new Error('chat conversation to the recipient is not available');
4187
4191
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xuda.io/ai_module",
3
- "version": "1.1.4260",
3
+ "version": "1.1.4261",
4
4
  "description": "Xuda AI Module",
5
5
  "main": "index.mjs",
6
6
  "type": "module",