user %!s(int64=6) %!d(string=hai) anos
pai
achega
3224057fe3
Modificáronse 6 ficheiros con 10 adicións e 4 borrados
  1. 3 0
      lib/contact-item.js
  2. 1 1
      lib/contact-item.js.map
  3. 1 1
      lib/index.js
  4. 1 1
      lib/index.js.map
  5. 3 0
      src/contact-item.ts
  6. 1 1
      src/index.ts

+ 3 - 0
lib/contact-item.js

@@ -80,6 +80,9 @@ class ContactItem {
             groups: this.groups,
             hash: this.hash,
             id: this.id,
+            lastChanged: this.lastChanged ? this.lastChanged.toISOString() : undefined,
+            lastReceived: this.lastReceived ? this.lastReceived.toISOString() : undefined,
+            lastSent: this.lastSent ? this.lastSent.toISOString() : undefined,
             me: this.me,
             name: this.name,
             notes: this.notes

A diferenza do arquivo foi suprimida porque é demasiado grande
+ 1 - 1
lib/contact-item.js.map


+ 1 - 1
lib/index.js

@@ -286,7 +286,7 @@ class BankClient {
             delete newProps.id;
             const newItem = util_1.mergeDeep(existingData, newProps);
             delete newItem.hash;
-            newItem.lastChanged = new Date().toLocaleString();
+            newItem.lastChanged = new Date().toISOString();
             const newItemHash = yield this.uploadSlimJSON(newItem);
             yield this.appendPrivate(peerId, '📇', newItemHash, existing.hash);
             const contactBook2 = yield this.getContactBook(peerId);

A diferenza do arquivo foi suprimida porque é demasiado grande
+ 1 - 1
lib/index.js.map


+ 3 - 0
src/contact-item.ts

@@ -104,6 +104,9 @@ export class ContactItem {
       groups: this.groups,
       hash: this.hash,
       id: this.id,
+      lastChanged: this.lastChanged ? this.lastChanged.toISOString() : undefined,
+      lastReceived: this.lastReceived ? this.lastReceived.toISOString() : undefined,
+      lastSent: this.lastSent ? this.lastSent.toISOString() : undefined,
       me: this.me,
       name: this.name,
       notes: this.notes

+ 1 - 1
src/index.ts

@@ -277,7 +277,7 @@ export class BankClient {
       delete newProps.id;
       const newItem: any = mergeDeep(existingData, newProps);
       delete newItem.hash;
-      newItem.lastChanged = new Date().toLocaleString();
+      newItem.lastChanged = new Date().toISOString();
       const newItemHash = await this.uploadSlimJSON(newItem);
       await this.appendPrivate(peerId, '📇', newItemHash, existing.hash);
       const contactBook2 = await this.getContactBook(peerId);