@xuda.io/ai_module 1.1.5542 → 1.1.5544
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 +7 -5
- package/package.json +1 -1
package/index.mjs
CHANGED
|
@@ -5075,24 +5075,26 @@ const add_conversation_item = async function (uid, profile_id, conversation_id,
|
|
|
5075
5075
|
|
|
5076
5076
|
const conversation_doc = await db_module.get_app_couch_doc_native(account_profile_info.app_id, conversation_id);
|
|
5077
5077
|
|
|
5078
|
-
let
|
|
5078
|
+
let initiator = `User Uid: ${uid} User Name: ${account_info.full_name}`;
|
|
5079
|
+
|
|
5080
|
+
let text = `${new Date()} ${initiator} Type: ${_.capitalize(conversation_type)} `;
|
|
5079
5081
|
|
|
5080
5082
|
switch (conversation_type) {
|
|
5081
5083
|
case 'note':
|
|
5082
|
-
text +=
|
|
5084
|
+
text += `:${body}`;
|
|
5083
5085
|
break;
|
|
5084
5086
|
|
|
5085
5087
|
case 'email':
|
|
5086
5088
|
// direction, from_mailbox
|
|
5087
|
-
text +=
|
|
5089
|
+
text += `:${body} ${metadata.direction === 'in' ? ' | Received' : ' | Sent'}`;
|
|
5088
5090
|
break;
|
|
5089
5091
|
|
|
5090
5092
|
case 'chat':
|
|
5091
|
-
text +=
|
|
5093
|
+
text += `:${body}`;
|
|
5092
5094
|
break;
|
|
5093
5095
|
|
|
5094
5096
|
case 'attachment':
|
|
5095
|
-
text +=
|
|
5097
|
+
text += `:${body}`;
|
|
5096
5098
|
break;
|
|
5097
5099
|
|
|
5098
5100
|
default:
|