@xuda.io/account_module 1.2.2299 → 1.2.2300
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 +15 -5
- package/package.json +1 -1
package/index.mjs
CHANGED
|
@@ -307,7 +307,6 @@ export const update_account_info = async function (req, job_id, headers) {
|
|
|
307
307
|
|
|
308
308
|
if (account_obj.account_info?.profile_picture) {
|
|
309
309
|
if (!account_obj.account_info?.profile_avatar && account_obj.account_info.profile_avatar_stat !== 2) {
|
|
310
|
-
debugger;
|
|
311
310
|
set_account_profile_picture(uid, uid, account_obj.account_info, job_id, headers, account_profile_info);
|
|
312
311
|
}
|
|
313
312
|
}
|
|
@@ -3222,7 +3221,6 @@ export const get_hosting_plan = function (req) {
|
|
|
3222
3221
|
if (_conf.PRICE_OBJ.server_slugs[app_obj.app_hosting.app_server_type]) {
|
|
3223
3222
|
return _conf.PRICE_OBJ.server_slugs[app_obj.app_hosting.app_server_type];
|
|
3224
3223
|
}
|
|
3225
|
-
debugger;
|
|
3226
3224
|
console.error('error: ' + app_obj.app_hosting.app_server_type + ' not found in PRICE_OBJ.server_slugs');
|
|
3227
3225
|
return { cpu: 0, price: 0 };
|
|
3228
3226
|
}
|
|
@@ -5943,13 +5941,26 @@ export const get_account_profile_info = async function (uid, contact_profile_doc
|
|
|
5943
5941
|
if (account_info_ret.code < 0) {
|
|
5944
5942
|
return;
|
|
5945
5943
|
}
|
|
5946
|
-
|
|
5944
|
+
// The main profile IS the account's own face: always mirror the account
|
|
5945
|
+
// avatar/picture on it, so the main-profile card matches the account avatar.
|
|
5946
|
+
// A divergent value stored on the main profile doc (e.g. a stale AI-generated
|
|
5947
|
+
// avatar) must not win. Non-main profiles keep their own, falling back to the
|
|
5948
|
+
// account avatar only when they have none.
|
|
5949
|
+
if (doc.main || !doc.profile_avatar) {
|
|
5947
5950
|
doc.profile_avatar = account_info_ret.data.profile_avatar;
|
|
5948
5951
|
}
|
|
5949
|
-
if (!doc.profile_picture) {
|
|
5952
|
+
if (doc.main || !doc.profile_picture) {
|
|
5950
5953
|
doc.profile_picture = account_info_ret.data.profile_picture;
|
|
5951
5954
|
}
|
|
5952
5955
|
|
|
5956
|
+
// The main profile is the account's OWN identity: it must never auto-respond
|
|
5957
|
+
// (you don't auto-reply to yourself). Force it off in the read model so the
|
|
5958
|
+
// card hides the control and no read-based consumer treats it as on. The
|
|
5959
|
+
// runtime (ai_module.auto_response) also hard-skips the main profile.
|
|
5960
|
+
if (doc.main) {
|
|
5961
|
+
doc.auto_respond = false;
|
|
5962
|
+
}
|
|
5963
|
+
|
|
5953
5964
|
if (!doc.account_type) {
|
|
5954
5965
|
doc.account_type = account_info_ret.data.account_type;
|
|
5955
5966
|
}
|
|
@@ -7092,7 +7103,6 @@ export const get_account_ai_usage_old = async function (req, job_id, headers) {
|
|
|
7092
7103
|
group_level: 999,
|
|
7093
7104
|
});
|
|
7094
7105
|
// console.log('ai_usage', ai_usage.rows);
|
|
7095
|
-
debugger;
|
|
7096
7106
|
let total_usage = 0;
|
|
7097
7107
|
let profile = {};
|
|
7098
7108
|
|