user 6 år sedan
förälder
incheckning
98fc5b7d9a
4 ändrade filer med 5 tillägg och 5 borttagningar
  1. 1 1
      lib/content-item.d.ts
  2. 1 1
      lib/content-item.js
  3. 1 1
      lib/content-item.js.map
  4. 2 2
      src/content-item.ts

+ 1 - 1
lib/content-item.d.ts

@@ -18,7 +18,7 @@ export declare class ContentItem {
     readonly fromContactId?: string;
     readonly toContactId?: string;
     readonly media?: string;
-    readonly relTargets: any;
+    readonly relTarget: any;
     constructor(hash: string, props: ContentParams);
     private formatCents;
 }

+ 1 - 1
lib/content-item.js

@@ -25,7 +25,7 @@ class ContentItem {
         this.fromContactId = this.allLinks.filter(x => x.rel === '.from-contact-id').map(x => x.target)[0];
         this.toContactId = this.allLinks.filter(x => x.rel === '.to-contact-id').map(x => x.target)[0];
         this.media = this.allLinks.filter(x => x.rel === '.media').map(x => x.target)[0];
-        this.relTargets = this.allLinks.reduce((accum, link) => {
+        this.relTarget = this.allLinks.reduce((accum, link) => {
             accum[link.rel] = link.target;
             return accum;
         }, {});

Filskillnaden har hållts tillbaka eftersom den är för stor
+ 1 - 1
lib/content-item.js.map


+ 2 - 2
src/content-item.ts

@@ -22,7 +22,7 @@ export class ContentItem {
   public readonly fromContactId?: string;
   public readonly toContactId?: string;
   public readonly media?: string;
-  public readonly relTargets: any;
+  public readonly relTarget: any;
   
   constructor(hash: string, props: ContentParams) {
     this.data = props;
@@ -49,7 +49,7 @@ export class ContentItem {
     this.fromContactId = this.allLinks.filter(x => x.rel === '.from-contact-id').map(x => x.target)[0];
     this.toContactId = this.allLinks.filter(x => x.rel === '.to-contact-id').map(x => x.target)[0];
     this.media = this.allLinks.filter(x => x.rel === '.media').map(x => x.target)[0];
-    this.relTargets = this.allLinks.reduce((accum, link) => {
+    this.relTarget = this.allLinks.reduce((accum, link) => {
       accum[link.rel] = link.target;
       return accum;
     }, {});