@xuda.io/account_module 1.2.1612 → 1.2.1613
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 -4
- package/package.json +1 -1
package/index.mjs
CHANGED
|
@@ -1921,7 +1921,7 @@ setTimeout(async () => {
|
|
|
1921
1921
|
// ret = _design.views.ai_chat_usage;
|
|
1922
1922
|
// console.log(_design.views.ai_chat_usage);
|
|
1923
1923
|
// ret = await set_contact_profile_picture(uid, 'cnt_2d21d55f8f0cdaf65a7a69f69617f532', {}, null, {});
|
|
1924
|
-
// ret = await
|
|
1924
|
+
// ret = await get_xuda_cache(uid, 'chat_thumbnail', 'word five title');
|
|
1925
1925
|
// add_ai_credits_to_active_accounts();
|
|
1926
1926
|
|
|
1927
1927
|
console.log(ret);
|
|
@@ -2137,7 +2137,7 @@ const set_contact_profile_picture = async function (uid, contact_id, metadata, j
|
|
|
2137
2137
|
}
|
|
2138
2138
|
await update_contact_profile_picture_status(uid, contact_id, 2);
|
|
2139
2139
|
if (!contact_obj.profile_picture) {
|
|
2140
|
-
const cache = await
|
|
2140
|
+
const cache = await get_xuda_cache(uid, 'profile_picture', contact_obj.email, contact_obj.name);
|
|
2141
2141
|
let file_ret = { code: 1, data: cache };
|
|
2142
2142
|
|
|
2143
2143
|
if (!cache) {
|
|
@@ -2160,7 +2160,7 @@ const set_contact_profile_picture = async function (uid, contact_id, metadata, j
|
|
|
2160
2160
|
}
|
|
2161
2161
|
|
|
2162
2162
|
if (!contact_obj.profile_avatar) {
|
|
2163
|
-
const cache = await
|
|
2163
|
+
const cache = await get_xuda_cache(uid, 'profile_avatar', contact_obj.email, contact_obj.name);
|
|
2164
2164
|
let file_ret = { code: 1, data: cache };
|
|
2165
2165
|
|
|
2166
2166
|
if (!cache) {
|
|
@@ -3035,7 +3035,7 @@ export const save_xuda_cache = async function (uid, docType, name, file, metadat
|
|
|
3035
3035
|
return save_ret;
|
|
3036
3036
|
};
|
|
3037
3037
|
|
|
3038
|
-
export const
|
|
3038
|
+
export const get_xuda_cache = async function (uid, docType, name, email) {
|
|
3039
3039
|
let ret = await db_module.find_couch_query('xuda_cache', {
|
|
3040
3040
|
selector: { docType, name: email.trim() },
|
|
3041
3041
|
limit: 1,
|