user 6 yıl önce
ebeveyn
işleme
48559e0d71

+ 3 - 3
lib/contact-item.js

@@ -11,9 +11,9 @@ class ContactItem {
         this.alternateNames = props.alternateNames || [];
         this.name = props.name || '';
         this.me = props.me;
-        this.lastSent = props.lastSent;
-        this.lastReceived = props.lastReceived;
-        this.lastChanged = props.lastChanged;
+        this.lastSent = props.lastSent ? new Date(props.lastSent) : undefined;
+        this.lastReceived = props.lastReceived ? new Date(props.lastReceived) : undefined;
+        this.lastChanged = props.lastChanged ? new Date(props.lastChanged) : undefined;
         this.notes = props.notes || '';
     }
     matchesGroup(group) {

Dosya farkı çok büyük olduğundan ihmal edildi
+ 1 - 1
lib/contact-item.js.map


+ 3 - 3
lib/contact-params.d.ts

@@ -7,7 +7,7 @@ export interface ContactParams {
     groups: string[];
     alternateNames: string[];
     notes: string;
-    lastSent?: Date;
-    lastReceived?: Date;
-    lastChanged?: Date;
+    lastSent?: string;
+    lastReceived?: string;
+    lastChanged?: string;
 }

+ 3 - 3
src/contact-item.ts

@@ -26,9 +26,9 @@ export class ContactItem {
     this.alternateNames = props.alternateNames || [];
     this.name = props.name || '';
     this.me = props.me;
-    this.lastSent = props.lastSent;
-    this.lastReceived = props.lastReceived;
-    this.lastChanged = props.lastChanged;
+    this.lastSent = props.lastSent ? new Date(props.lastSent) : undefined;
+    this.lastReceived = props.lastReceived ? new Date(props.lastReceived) : undefined;
+    this.lastChanged = props.lastChanged ? new Date(props.lastChanged) : undefined;
     this.notes = props.notes || '';
   }
 

+ 3 - 3
src/contact-params.ts

@@ -7,7 +7,7 @@ export interface ContactParams {
     groups: string[];
     alternateNames: string[];
     notes: string;
-    lastSent?: Date;
-    lastReceived?: Date;
-    lastChanged?: Date;
+    lastSent?: string;
+    lastReceived?: string;
+    lastChanged?: string;
 }