@xuda.io/ai_module 1.1.4153 → 1.1.4155
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 +5 -4
- package/package.json +1 -1
package/index.mjs
CHANGED
|
@@ -3300,7 +3300,7 @@ export const update_ai_agent_properties = async function (doc, app_id, uid, fiel
|
|
|
3300
3300
|
return save_ret;
|
|
3301
3301
|
};
|
|
3302
3302
|
|
|
3303
|
-
export const update_thumbnail = async function (type, doc, app_id, uid, job_id, headers, xuda_db, tags) {
|
|
3303
|
+
export const update_thumbnail = async function (type, doc, app_id, uid, job_id, headers, xuda_db, tags, account_profile_info) {
|
|
3304
3304
|
let prompt = '';
|
|
3305
3305
|
|
|
3306
3306
|
// setTimeout(async () => {
|
|
@@ -4190,7 +4190,7 @@ export const create_conversation = async function (req, job_id, headers) {
|
|
|
4190
4190
|
|
|
4191
4191
|
await db_module.save_app_couch_doc_native(account_profile_info.app_id, conversation_doc);
|
|
4192
4192
|
|
|
4193
|
-
await update_thumbnail('conversation', conversation_doc, app_id, uid, job_id, headers);
|
|
4193
|
+
await update_thumbnail('conversation', conversation_doc, app_id, uid, job_id, headers, null, null, account_profile_info);
|
|
4194
4194
|
|
|
4195
4195
|
if (conversation_doc.reference_type === 'contacts') {
|
|
4196
4196
|
if (contact_uid_chat_conversation) {
|
|
@@ -5511,6 +5511,7 @@ const create_and_upload_image_to_drive = async function (drive_type, file_path,
|
|
|
5511
5511
|
export const create_account_profile_avatar = async function (req, job_id, headers) {
|
|
5512
5512
|
const { uid } = req;
|
|
5513
5513
|
try {
|
|
5514
|
+
req.account_profile_info = await account_module.get_active_account_profile_info(uid);
|
|
5514
5515
|
req.is_profile_avatar = true;
|
|
5515
5516
|
req.account_obj = await db_module.get_couch_doc_native('xuda_accounts', uid);
|
|
5516
5517
|
|
|
@@ -5855,7 +5856,7 @@ export const create_profile_avatar = async function (req, job_id, headers) {
|
|
|
5855
5856
|
};
|
|
5856
5857
|
|
|
5857
5858
|
export const conversation_actions = async function (req, job_id, headers) {
|
|
5858
|
-
const { conversation_id, item_id, action, uid } = req;
|
|
5859
|
+
const { conversation_id, item_id, action, uid, account_profile_info } = req;
|
|
5859
5860
|
try {
|
|
5860
5861
|
if (!conversation_id || conversation_id === 'undefined') {
|
|
5861
5862
|
throw new Error('conversation_id is missing or invalid:' + conversation_id);
|
|
@@ -5973,7 +5974,7 @@ export const modify_profile_avatar = async function (req, job_id, headers) {
|
|
|
5973
5974
|
}
|
|
5974
5975
|
|
|
5975
5976
|
let account_obj = await db_module.get_couch_doc_native('xuda_accounts', uid);
|
|
5976
|
-
const ret = await create_profile_avatar({ prompt, url: account_obj.account_info?.profile_avatar, uid, account_obj }, job_id, headers);
|
|
5977
|
+
const ret = await create_profile_avatar({ prompt, url: account_obj.account_info?.profile_avatar, uid, account_obj, account_profile_info }, job_id, headers);
|
|
5977
5978
|
return ret;
|
|
5978
5979
|
} catch (err) {
|
|
5979
5980
|
return { code: -111, data: err.message };
|