@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.
- package/index.mjs +4 -0
- 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
|
}
|