From 7ecade67dd5c442811c4f0b99dc97fa12cd00c1e Mon Sep 17 00:00:00 2001 From: Ariel Gentile Date: Tue, 24 Jan 2023 20:13:06 -0300 Subject: [PATCH] style: run prettier Signed-off-by: Ariel Gentile --- src/MediaSharingApi.ts | 2 +- src/repository/MediaSharingRecord.ts | 7 +++---- test/mediasharing.test.ts | 1 - 3 files changed, 4 insertions(+), 6 deletions(-) diff --git a/src/MediaSharingApi.ts b/src/MediaSharingApi.ts index 28906ca..af9d527 100644 --- a/src/MediaSharingApi.ts +++ b/src/MediaSharingApi.ts @@ -73,7 +73,7 @@ export class MediaSharingApi { const { message: payload } = await this.mediaSharingService.createMediaShare(this.agentContext, { record: record, - items: options.items?.map(item => new SharedMediaItem(item)), + items: options.items?.map((item) => new SharedMediaItem(item)), description: options.description, parentThreadId: options.parentThreadId, }) diff --git a/src/repository/MediaSharingRecord.ts b/src/repository/MediaSharingRecord.ts index 8f426a2..becfc38 100644 --- a/src/repository/MediaSharingRecord.ts +++ b/src/repository/MediaSharingRecord.ts @@ -16,19 +16,18 @@ export interface SharedMediaItemOptions extends Omit } export class SharedMediaItem extends Attachment { - @Exclude() public get uri() { return this.data.links ? this.data.links[0] : undefined } public ciphering?: CipheringInfo - public metadata?: Record + public metadata?: Record public constructor(options: SharedMediaItemOptions) { - super({ ...options, data: new AttachmentData({ links: [ options?.uri ] })}) + super({ ...options, data: new AttachmentData({ links: [options?.uri] }) }) if (options) { - this.ciphering = options.ciphering + this.ciphering = options.ciphering this.metadata = options.metadata } } diff --git a/test/mediasharing.test.ts b/test/mediasharing.test.ts index a9f9df3..b535fa7 100644 --- a/test/mediasharing.test.ts +++ b/test/mediasharing.test.ts @@ -142,6 +142,5 @@ describe('media test', () => { expect(bobRecord.items?.length).toBe(1) expect(bobRecord.items![0].mimeType).toBe('image/png') expect(bobRecord.items![0].uri).toBe('http://blabla') - }) })