Skip to content

Commit

Permalink
fix(pds): include aspectRatio on read-sticky posts (#1824)
Browse files Browse the repository at this point in the history
* fix: include aspectRatio on read-sticky

* chore: add missing alt text test case
  • Loading branch information
mary-ext authored Nov 30, 2023
1 parent 401538a commit 6da8182
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions packages/pds/src/services/local/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -220,6 +220,7 @@ export class LocalService {
did,
img.image.ref.toString(),
),
aspectRatio: img.aspectRatio,
alt: img.alt,
}))
return {
Expand Down
3 changes: 3 additions & 0 deletions packages/pds/tests/proxied/read-after-write.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,7 @@ describe('proxy read after write', () => {
images: [
{
image: img.image,
aspectRatio: { height: 2, width: 1 },
alt: 'alt text',
},
],
Expand Down Expand Up @@ -190,6 +191,8 @@ describe('proxy read after write', () => {
img.image.ref.toString(),
),
)
expect(imgs.images[0].aspectRatio).toEqual({ height: 2, width: 1 })
expect(imgs.images[0].alt).toBe('alt text')
expect(replies[0].replies?.length).toBe(1)
// @ts-ignore
expect(replies[0].replies[0].post.uri).toEqual(replyRes2.uri)
Expand Down

0 comments on commit 6da8182

Please sign in to comment.