Skip to content

Commit

Permalink
style: run prettier
Browse files Browse the repository at this point in the history
Signed-off-by: Ariel Gentile <[email protected]>
  • Loading branch information
genaris committed Jan 24, 2023
1 parent 61bc9e8 commit 7ecade6
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/MediaSharingApi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
})
Expand Down
7 changes: 3 additions & 4 deletions src/repository/MediaSharingRecord.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,19 +16,18 @@ export interface SharedMediaItemOptions extends Omit<AttachmentOptions, 'data'>
}

export class SharedMediaItem extends Attachment {

@Exclude()
public get uri() {
return this.data.links ? this.data.links[0] : undefined
}

public ciphering?: CipheringInfo
public metadata?: Record<string, unknown>
public metadata?: Record<string, unknown>

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
}
}
Expand Down
1 change: 0 additions & 1 deletion test/mediasharing.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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')

})
})

0 comments on commit 7ecade6

Please sign in to comment.