@xuda.io/account_module 1.2.326 → 1.2.328

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.
Files changed (2) hide show
  1. package/index.mjs +4 -9
  2. package/package.json +1 -1
package/index.mjs CHANGED
@@ -1561,15 +1561,10 @@ export const get_user_name = async function (uid) {
1561
1561
 
1562
1562
  export const update_contacts_with_account_changes = async function (uid, changes = []) {
1563
1563
  try {
1564
- const account_info = await get_account_name({ uid });
1565
- let username = 'unknown';
1566
- if (account_info) {
1567
- username = account_info.first_name + ' ' + account_info.last_name;
1568
-
1569
- if (!username) {
1570
- username = +account_info.email;
1571
- }
1572
- }
1564
+ if (!changes.length) return;
1565
+ const ret = await db_module.get_couch_doc('xuda_accounts', uid);
1566
+ var account_obj = ret.data;
1567
+ account_obj.ts = Date.now();
1573
1568
 
1574
1569
  // update all uid contacts with the new avatar
1575
1570
  const opt = {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xuda.io/account_module",
3
- "version": "1.2.326",
3
+ "version": "1.2.328",
4
4
  "description": "Xuda Account Server Module",
5
5
  "main": "index.mjs",
6
6
  "dependencies": {